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:
Ingo Weinhold 2003-07-01 20:38:32 +00:00
parent 7e65f8eb29
commit 76aa3218cb
4 changed files with 1196 additions and 0 deletions

View File

@ -9,6 +9,7 @@ CommonTestLib libkernelutilstest.so
: KernelUtilsTestAddon.cpp
# AVLTreeMapTest.cpp
SinglyLinkedListTest.cpp
VectorMapTest.cpp
VectorSetTest.cpp
VectorTest.cpp
: stdc++.r4

View File

@ -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;

File diff suppressed because it is too large Load Diff

View 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_