aboutsummaryrefslogtreecommitdiff
path: root/test/containers.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2013-03-05 19:47:09 +0100
committerSebastian Geerken <devnull@localhost>2013-03-05 19:47:09 +0100
commit58cafbd3e2e8871b93cc3717d771cf068c10a304 (patch)
tree13ef28d063d9f3df5f6c2dbace5029ece904ab0b /test/containers.cc
parent7eb22421916024f6ebee85473747ebfff6283438 (diff)
Fixed a bug in Vector::bsearch.
Diffstat (limited to 'test/containers.cc')
-rw-r--r--test/containers.cc23
1 files changed, 20 insertions, 3 deletions
diff --git a/test/containers.cc b/test/containers.cc
index d8107bdf..40b2d8c8 100644
--- a/test/containers.cc
+++ b/test/containers.cc
@@ -36,9 +36,9 @@ void testHashTable ()
puts (h.toString());
}
-void testVector ()
+void testVector1 ()
{
- puts ("--- testVector ---");
+ puts ("--- testVector (1) ---");
Vector<String> v (true, 1);
@@ -49,7 +49,23 @@ void testVector ()
v.sort ();
puts (v.toString());
+}
+
+void testVector2 ()
+{
+ puts ("--- testVector (2) ---");
+ Vector<String> v (true, 1);
+
+ v.insertSorted (new String ("one"));
+ puts (v.toString());
+
+ v.insertSorted (new String ("two"));
+ puts (v.toString());
+
+ v.insertSorted (new String ("three"));
+ puts (v.toString());
+
v.insertSorted (new String ("five"));
puts (v.toString());
@@ -83,7 +99,8 @@ int main (int argc, char *argv[])
{
testHashSet ();
testHashTable ();
- testVector ();
+ testVector1 ();
+ testVector2 ();
return 0;
}