tmp
This commit is contained in:
parent
00d8fa0886
commit
65cb26a627
34 changed files with 288 additions and 264 deletions
|
|
@ -7,7 +7,7 @@ using namespace tp;
|
|||
SUITE(DoubleLinkedList) {
|
||||
|
||||
TEST(SimpleReference) {
|
||||
tp::List<TestClass, tp::HeapAlloc> list = { TestClass(1), TestClass(2), TestClass(3), TestClass(4) };
|
||||
tp::List<TestClass, TestAllocator> list = { TestClass(1), TestClass(2), TestClass(3), TestClass(4) };
|
||||
|
||||
list.pushBack(TestClass(5));
|
||||
list.pushFront(TestClass(0));
|
||||
|
|
@ -24,7 +24,9 @@ SUITE(DoubleLinkedList) {
|
|||
}
|
||||
|
||||
TEST(SimplePointer) {
|
||||
tp::List<TestClass*, tp::HeapAlloc> list = { new TestClass(1), new TestClass(2), new TestClass(3), new TestClass(4) };
|
||||
tp::List<TestClass*, TestAllocator> list = {
|
||||
new TestClass(1), new TestClass(2), new TestClass(3), new TestClass(4)
|
||||
};
|
||||
|
||||
list.pushBack(new TestClass(5));
|
||||
list.pushFront(new TestClass(0));
|
||||
|
|
@ -45,8 +47,8 @@ SUITE(DoubleLinkedList) {
|
|||
}
|
||||
|
||||
TEST(Copy) {
|
||||
tp::List<TestClass, tp::HeapAlloc> list = { TestClass(1), TestClass(2), TestClass(3), TestClass(4) };
|
||||
tp::List<TestClass, tp::HeapAlloc> list2 = list;
|
||||
tp::List<TestClass, TestAllocator> list = { TestClass(1), TestClass(2), TestClass(3), TestClass(4) };
|
||||
tp::List<TestClass, TestAllocator> list2 = list;
|
||||
|
||||
CHECK(list == list2);
|
||||
|
||||
|
|
@ -55,7 +57,7 @@ SUITE(DoubleLinkedList) {
|
|||
}
|
||||
|
||||
TEST(Serialization) {
|
||||
tp::List<TestClass, tp::HeapAlloc> list = { TestClass(1), TestClass(2), TestClass(3), TestClass(4) };
|
||||
tp::List<TestClass, TestAllocator> list = { TestClass(1), TestClass(2), TestClass(3), TestClass(4) };
|
||||
|
||||
ArchiverExample<1024, false> write;
|
||||
ArchiverExample<1024, true> read;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue