diff options
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/hash.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tests/hash.cpp b/src/tests/hash.cpp index a7f0a57..58e0112 100644 --- a/src/tests/hash.cpp +++ b/src/tests/hash.cpp | |||
| @@ -78,6 +78,7 @@ int main() | |||
| 78 | printf("%d: %s\n", (*j).second, (*j).first.c_str() ); | 78 | printf("%d: %s\n", (*j).second, (*j).first.c_str() ); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | printf("Testing\n-------------------\n\n"); | ||
| 81 | for( int j = 0; j < 33; j++ ) | 82 | for( int j = 0; j < 33; j++ ) |
| 82 | { | 83 | { |
| 83 | if( sTest.has(names[j]) ) | 84 | if( sTest.has(names[j]) ) |
| @@ -95,5 +96,16 @@ int main() | |||
| 95 | printf("Missing element %d, '%s'\n", j, names[j] ); | 96 | printf("Missing element %d, '%s'\n", j, names[j] ); |
| 96 | } | 97 | } |
| 97 | } | 98 | } |
| 99 | |||
| 100 | printf("Clearing\n-------------------\n\n"); | ||
| 101 | |||
| 102 | sTest.clear(); | ||
| 103 | |||
| 104 | for( Hash<std::string, int>::iterator i = sTest.begin(); | ||
| 105 | i != sTest.end(); i++ ) | ||
| 106 | { | ||
| 107 | Hash<std::string, int>::iterator j = i; | ||
| 108 | printf("%d: %s\n", (*j).second, (*j).first.c_str() ); | ||
| 109 | } | ||
| 98 | } | 110 | } |
| 99 | 111 | ||
