aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-07-26 21:58:35 +0000
committerMike Buland <eichlan@xagasoft.com>2006-07-26 21:58:35 +0000
commit76ed3c164662f4ee4c109bb2054c61c99ea86251 (patch)
tree301d4687f95a457304b0e796984b62fa89992718 /src/test
parent579c3ac445043122b0a702bdb2542d9ea404b62e (diff)
downloadlibbu++-76ed3c164662f4ee4c109bb2054c61c99ea86251.tar.gz
libbu++-76ed3c164662f4ee4c109bb2054c61c99ea86251.tar.bz2
libbu++-76ed3c164662f4ee4c109bb2054c61c99ea86251.tar.xz
libbu++-76ed3c164662f4ee4c109bb2054c61c99ea86251.zip
Added the not-yet-working hash class. More thought must be done. This doesn't
actually change any existing code really just adds a new class that you can't use because it's commented out. I'll probably move it to a branch.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/exception/exception.cpp8
-rw-r--r--src/test/hash/main.cpp10
2 files changed, 14 insertions, 4 deletions
diff --git a/src/test/exception/exception.cpp b/src/test/exception/exception.cpp
index 33dcd5e..6417692 100644
--- a/src/test/exception/exception.cpp
+++ b/src/test/exception/exception.cpp
@@ -1,16 +1,16 @@
1#include <iostream> 1#include <iostream>
2#include "exception.h" 2#include "exceptions.h"
3 3
4int main() 4int main()
5{ 5{
6 try 6 try
7 { 7 {
8 throw Exception( 42, "There was an error on line: %d", __LINE__ ); 8 throw ExceptionBase( 42, "There was an error on line: %d", __LINE__ );
9 } 9 }
10 catch( Exception &e ) 10 catch( ExceptionBase &e )
11 { 11 {
12 std::cout << "Error "<< e.getErrorCode() << ": " << e.what() << "\n"; 12 std::cout << "Error "<< e.getErrorCode() << ": " << e.what() << "\n";
13 } 13 }
14 14
15 throw Exception( 112, "This exception wasn't caught!"); 15 throw ExceptionBase( 112, "This exception wasn't caught!");
16} 16}
diff --git a/src/test/hash/main.cpp b/src/test/hash/main.cpp
new file mode 100644
index 0000000..d0f5fa6
--- /dev/null
+++ b/src/test/hash/main.cpp
@@ -0,0 +1,10 @@
1#include "hash.h"
2#include "staticstring.h"
3
4int main()
5{
6 //Hash<class StaticString, int> sTest;
7
8 //sTest.hasKey("hello");
9}
10