Added unit tests for VectorMap.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3794 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7e65f8eb29
commit
76aa3218cb
@ -9,6 +9,7 @@ CommonTestLib libkernelutilstest.so
|
||||
: KernelUtilsTestAddon.cpp
|
||||
# AVLTreeMapTest.cpp
|
||||
SinglyLinkedListTest.cpp
|
||||
VectorMapTest.cpp
|
||||
VectorSetTest.cpp
|
||||
VectorTest.cpp
|
||||
: stdc++.r4
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <TestSuiteAddon.h>
|
||||
//#include <AVLTreeMapTest.h>
|
||||
#include <SinglyLinkedListTest.h>
|
||||
#include <VectorMapTest.h>
|
||||
#include <VectorSetTest.h>
|
||||
#include <VectorTest.h>
|
||||
|
||||
@ -9,6 +10,7 @@ BTestSuite* getTestSuite() {
|
||||
BTestSuite *suite = new BTestSuite("KernelUtils");
|
||||
// suite->addTest("AVLTreeMap", AVLTreeMapTest::Suite());
|
||||
suite->addTest("SinglyLinkedList", SinglyLinkedListTest::Suite());
|
||||
suite->addTest("VectorMap", VectorMapTest::Suite());
|
||||
suite->addTest("VectorSet", VectorSetTest::Suite());
|
||||
suite->addTest("Vector", VectorTest::Suite());
|
||||
return suite;
|
||||
|
1164
src/tests/kernel/core/util/VectorMapTest.cpp
Normal file
1164
src/tests/kernel/core/util/VectorMapTest.cpp
Normal file
File diff suppressed because it is too large
Load Diff
29
src/tests/kernel/core/util/VectorMapTest.h
Normal file
29
src/tests/kernel/core/util/VectorMapTest.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef _vector_map_test_h_
|
||||
#define _vector_map_test_h_
|
||||
|
||||
#include <TestCase.h>
|
||||
|
||||
class VectorMapTest : public BTestCase {
|
||||
public:
|
||||
VectorMapTest(std::string name = "");
|
||||
|
||||
static CppUnit::Test* Suite();
|
||||
|
||||
void ConstructorTest();
|
||||
void InsertTest();
|
||||
void PutTest();
|
||||
void GetTest();
|
||||
void RemoveTest();
|
||||
void EraseTest();
|
||||
void MakeEmptyTest();
|
||||
void IndexAccessTest();
|
||||
void FindTest();
|
||||
void FindCloseTest();
|
||||
void IteratorTest();
|
||||
|
||||
private:
|
||||
template <class List>
|
||||
void TestList(List &list, typename List::ValueType *values, int valueCount);
|
||||
};
|
||||
|
||||
#endif // _vector_map_test_h_
|
Loading…
Reference in New Issue
Block a user