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:
@@ -9,6 +9,7 @@ CommonTestLib libkernelutilstest.so
|
|||||||
: KernelUtilsTestAddon.cpp
|
: KernelUtilsTestAddon.cpp
|
||||||
# AVLTreeMapTest.cpp
|
# AVLTreeMapTest.cpp
|
||||||
SinglyLinkedListTest.cpp
|
SinglyLinkedListTest.cpp
|
||||||
|
VectorMapTest.cpp
|
||||||
VectorSetTest.cpp
|
VectorSetTest.cpp
|
||||||
VectorTest.cpp
|
VectorTest.cpp
|
||||||
: stdc++.r4
|
: stdc++.r4
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include <TestSuiteAddon.h>
|
#include <TestSuiteAddon.h>
|
||||||
//#include <AVLTreeMapTest.h>
|
//#include <AVLTreeMapTest.h>
|
||||||
#include <SinglyLinkedListTest.h>
|
#include <SinglyLinkedListTest.h>
|
||||||
|
#include <VectorMapTest.h>
|
||||||
#include <VectorSetTest.h>
|
#include <VectorSetTest.h>
|
||||||
#include <VectorTest.h>
|
#include <VectorTest.h>
|
||||||
|
|
||||||
@@ -9,6 +10,7 @@ BTestSuite* getTestSuite() {
|
|||||||
BTestSuite *suite = new BTestSuite("KernelUtils");
|
BTestSuite *suite = new BTestSuite("KernelUtils");
|
||||||
// suite->addTest("AVLTreeMap", AVLTreeMapTest::Suite());
|
// suite->addTest("AVLTreeMap", AVLTreeMapTest::Suite());
|
||||||
suite->addTest("SinglyLinkedList", SinglyLinkedListTest::Suite());
|
suite->addTest("SinglyLinkedList", SinglyLinkedListTest::Suite());
|
||||||
|
suite->addTest("VectorMap", VectorMapTest::Suite());
|
||||||
suite->addTest("VectorSet", VectorSetTest::Suite());
|
suite->addTest("VectorSet", VectorSetTest::Suite());
|
||||||
suite->addTest("Vector", VectorTest::Suite());
|
suite->addTest("Vector", VectorTest::Suite());
|
||||||
return suite;
|
return suite;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -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_
|
||||||
Reference in New Issue
Block a user