aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
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