-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnitTests.cpp
More file actions
59 lines (45 loc) · 1.44 KB
/
UnitTests.cpp
File metadata and controls
59 lines (45 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright 2015, The maxSocket Contributors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// foudn in the LICENSE file.
#include <max/Testing/TestSuite.hpp>
#include <memory>
#include <stdint.h>
#include <maxSocket/Buffer.hpp>
#include <maxSocket/IP/Address.hpp>
#include <maxSocket/IP/Version.hpp>
int main() {
max::Testing::TestSuite( L"maxSocket::Buffer",
max::Testing::AddTest( L"constructor",
[]( auto const & CurrentTestSuite ) {
const size_t UsedSize = 0;
const size_t TotalSize = 10;
auto BufferData = std::make_unique< uint8_t[] >( TotalSize );
auto TestObject = maxSocket::Buffer{ std::move( BufferData ), UsedSize, TotalSize };
CurrentTestSuite.AssertEqualTo( TestObject.UsedSize, UsedSize );
CurrentTestSuite.AssertEqualTo( TestObject.TotalSize, TotalSize );
}
)
);
// maxSocket::IP::AddressVersion4
// maxsocket::IP::AddressVersion6
// maxSocket::Socket
// constructor
// Disconnect
// Send
// Receive
// maxSocket::SocketSystem
// CreateSocketSystem
// ResolveHostName
// CreateSocketAndConnect
/*
max::Testing::TestSuite( L"maxSocket:IP::Address",
max::Testing::AddTest( L"constructor",
[]( auto const & CurrentTestSuite ) {
const auto Version = maxSocket::IP::Version::Version4;
auto TestObject = maxSocket::IP::Address{ Version };
CurrentTestSuite.AssertEqualTo( TestObject.m_Version, Version );
}
)
);
*/
}