aboutsummaryrefslogtreecommitdiff
path: root/src/unit
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-05-26 05:35:02 +0000
committerMike Buland <eichlan@xagasoft.com>2010-05-26 05:35:02 +0000
commitb1522d279d22725a731cb8db93ec2d077028374c (patch)
tree9ad5f2471fdac3a9bbaddaf513ede562d87b8438 /src/unit
parent24ab24777d7cd72b7ff35a9d02cb43e26f006b0d (diff)
downloadlibbu++-b1522d279d22725a731cb8db93ec2d077028374c.tar.gz
libbu++-b1522d279d22725a731cb8db93ec2d077028374c.tar.bz2
libbu++-b1522d279d22725a731cb8db93ec2d077028374c.tar.xz
libbu++-b1522d279d22725a731cb8db93ec2d077028374c.zip
More tweaks and informational functions.
Diffstat (limited to '')
-rw-r--r--src/unit/array.unit19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/unit/array.unit b/src/unit/array.unit
index 1493033..f3fdeda 100644
--- a/src/unit/array.unit
+++ b/src/unit/array.unit
@@ -9,6 +9,9 @@
9#include "bu/hash.h" 9#include "bu/hash.h"
10#include "bu/array.h" 10#include "bu/array.h"
11 11
12#include "bu/sio.h"
13using Bu::sio;
14
12suite Array 15suite Array
13{ 16{
14 test general 17 test general
@@ -82,4 +85,20 @@ suite Array
82 unitTest( a3[1].get("Test") == "Bloop" ); 85 unitTest( a3[1].get("Test") == "Bloop" );
83 unitTest( a3[1].get("Foo") == "ooF" ); 86 unitTest( a3[1].get("Foo") == "ooF" );
84 } 87 }
88
89 test insert
90 {
91 Bu::Array<int> aInts;
92 aInts.insert( aInts.end(), 4 );
93 aInts.insert( aInts.begin(), 1 );
94 aInts.insert( aInts.end(), 5 );
95 aInts.insert( aInts.begin()+1, 3 );
96 aInts.insert( aInts.begin()+1, 2 );
97 aInts.insert( aInts.begin(), 0 );
98
99 for( int j = 0; j < 6; j++ )
100 {
101 unitTest( aInts[j] == j );
102 }
103 }
85} 104}