diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2009-04-02 15:00:14 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2009-04-02 15:00:14 +0000 |
| commit | aaeaa599a14642e916bbd8a32a208ee96a26eaac (patch) | |
| tree | dd96f81051b43e398059c9463cfd1997e08d217a /src/unit | |
| parent | e9e5da32b2e154698482b7ec6b7ab2098cd849c8 (diff) | |
| download | libbu++-aaeaa599a14642e916bbd8a32a208ee96a26eaac.tar.gz libbu++-aaeaa599a14642e916bbd8a32a208ee96a26eaac.tar.bz2 libbu++-aaeaa599a14642e916bbd8a32a208ee96a26eaac.tar.xz libbu++-aaeaa599a14642e916bbd8a32a208ee96a26eaac.zip | |
Array iterators' validity testing was actually reversed. That was a serious
problem. Also, arrays now have a formatter.
Diffstat (limited to 'src/unit')
| -rw-r--r-- | src/unit/array.unit | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/unit/array.unit b/src/unit/array.unit index d5fc573..3a777d3 100644 --- a/src/unit/array.unit +++ b/src/unit/array.unit | |||
| @@ -32,11 +32,13 @@ | |||
| 32 | int j = 0; | 32 | int j = 0; |
| 33 | for( Bu::Array<int>::iterator i = ai.begin(); i != ai.end(); i++ ) | 33 | for( Bu::Array<int>::iterator i = ai.begin(); i != ai.end(); i++ ) |
| 34 | unitTest( (*i) == j++ ); | 34 | unitTest( (*i) == j++ ); |
| 35 | unitTest( j == 10 ); | ||
| 35 | 36 | ||
| 36 | const Bu::Array<int> &ci = ai; | 37 | const Bu::Array<int> &ci = ai; |
| 37 | j = 0; | 38 | j = 0; |
| 38 | for( Bu::Array<int>::const_iterator i = ci.begin(); i != ci.end(); i++ ) | 39 | for( Bu::Array<int>::const_iterator i = ci.begin(); i != ci.end(); i++ ) |
| 39 | unitTest( (*i) == j++ ); | 40 | unitTest( (*i) == j++ ); |
| 41 | unitTest( j == 10 ); | ||
| 40 | } | 42 | } |
| 41 | 43 | ||
| 42 | {%iterate2} | 44 | {%iterate2} |
