diff options
Diffstat (limited to '')
| -rw-r--r-- | src/tests/hash.cpp | 31 | ||||
| -rw-r--r-- | src/tests/hash2.cpp | 35 |
2 files changed, 0 insertions, 66 deletions
diff --git a/src/tests/hash.cpp b/src/tests/hash.cpp deleted file mode 100644 index 7cefb79..0000000 --- a/src/tests/hash.cpp +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2007-2011 Xagasoft, All rights reserved. | ||
| 3 | * | ||
| 4 | * This file is part of the libbu++ library and is released under the | ||
| 5 | * terms of the license contained in the file LICENSE. | ||
| 6 | */ | ||
| 7 | |||
| 8 | #include "bu/hash.h" | ||
| 9 | #include "bu/sptr.h" | ||
| 10 | |||
| 11 | typedef struct Bob | ||
| 12 | { | ||
| 13 | int nID; | ||
| 14 | } Bob; | ||
| 15 | |||
| 16 | int main() | ||
| 17 | { | ||
| 18 | Bu::Hash<int, Bu::SPtr<const Bob> > lb; | ||
| 19 | for( int j = 0; j < 10; j++ ) | ||
| 20 | { | ||
| 21 | Bob *b = new Bob; | ||
| 22 | b->nID = j; | ||
| 23 | lb.insert( j, b ); | ||
| 24 | } | ||
| 25 | |||
| 26 | for( int j = 0; j < 10; j++ ) | ||
| 27 | { | ||
| 28 | printf("%d\n", lb[j].getValue()->nID ); | ||
| 29 | } | ||
| 30 | } | ||
| 31 | |||
diff --git a/src/tests/hash2.cpp b/src/tests/hash2.cpp deleted file mode 100644 index 55bb4c9..0000000 --- a/src/tests/hash2.cpp +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2007-2011 Xagasoft, All rights reserved. | ||
| 3 | * | ||
| 4 | * This file is part of the libbu++ library and is released under the | ||
| 5 | * terms of the license contained in the file LICENSE. | ||
| 6 | */ | ||
| 7 | |||
| 8 | #include <bu/string.h> | ||
| 9 | #include <bu/hash.h> | ||
| 10 | |||
| 11 | int main() | ||
| 12 | { | ||
| 13 | Bu::Hash<Bu::String, int> hCmd; | ||
| 14 | |||
| 15 | hCmd.insert("help", 5 ); | ||
| 16 | hCmd.insert("exit", 5 ); | ||
| 17 | hCmd.insert("getkey", 5 ); | ||
| 18 | hCmd.insert("setcrypt", 5 ); | ||
| 19 | hCmd.insert("user", 5 ); | ||
| 20 | hCmd.insert("pass", 5 ); | ||
| 21 | hCmd.erase("getkey"); | ||
| 22 | hCmd.erase("setcrypt"); | ||
| 23 | hCmd.insert("user", 5 ); | ||
| 24 | hCmd.insert("pass", 5 ); | ||
| 25 | hCmd.erase("pass"); | ||
| 26 | hCmd.erase("user"); | ||
| 27 | hCmd.insert("acl", 5 ); | ||
| 28 | hCmd.insert("owner", 5 ); | ||
| 29 | hCmd.insert("operator", 5 ); | ||
| 30 | hCmd.insert("admin", 5 ); | ||
| 31 | hCmd.insert("monitor", 5 ); | ||
| 32 | hCmd.insert("shutdown", 5 ); | ||
| 33 | |||
| 34 | return 0; | ||
| 35 | } | ||
