|
@@ -1,12 +1,13 @@
|
|
|
-#include <stdio.h>
|
|
|
-
|
|
|
#include "test/Test.h"
|
|
|
#include "tests/ArrayListTests.h"
|
|
|
#include "tests/ArrayStringTests.h"
|
|
|
#include "tests/ArrayTests.h"
|
|
|
#include "tests/BitArrayTests.h"
|
|
|
#include "tests/BoxTests.h"
|
|
|
+#include "tests/BufferTests.h"
|
|
|
#include "tests/BufferedValueTests.h"
|
|
|
+#include "tests/ClockTests.h"
|
|
|
+#include "tests/ColorTests.h"
|
|
|
#include "tests/ComponentsTests.h"
|
|
|
#include "tests/FrustumTests.h"
|
|
|
#include "tests/HashMapTests.h"
|
|
@@ -17,25 +18,30 @@
|
|
|
#include "tests/MatrixTests.h"
|
|
|
#include "tests/PlaneTests.h"
|
|
|
#include "tests/QuaternionTests.h"
|
|
|
+#include "tests/RandomTests.h"
|
|
|
#include "tests/RingBufferTests.h"
|
|
|
#include "tests/StackTests.h"
|
|
|
#include "tests/UniquePointerTests.h"
|
|
|
#include "tests/UtilityTests.h"
|
|
|
#include "tests/VectorTests.h"
|
|
|
#include "tests/ViewTests.h"
|
|
|
+#include "utils/ArrayString.h"
|
|
|
#include "utils/Utility.h"
|
|
|
|
|
|
static void onExit(int code, void* data) {
|
|
|
unsigned int i = *static_cast<unsigned int*>(data);
|
|
|
- printf("Hello from exit %d: 0x%x\n", code, i);
|
|
|
+ Core::ArrayString<1024> s;
|
|
|
+ CORE_TEST_FALSE(s.append("Hello from exit #: #"));
|
|
|
+ CORE_TEST_FALSE(s.format(code, i));
|
|
|
+ CORE_TEST_FALSE(s.printLine());
|
|
|
+ Core::Test::finalize();
|
|
|
}
|
|
|
|
|
|
-static void onError(const char* file, int line, Core::Error e, void* data) {
|
|
|
+static void onError(const char* file, int line, Core::Error e, void*) {
|
|
|
if(e == Core::Error::CAPACITY_REACHED ||
|
|
|
e == Core::Error::INVALID_REMOVE_INDEX) {
|
|
|
return;
|
|
|
}
|
|
|
- (void)data;
|
|
|
CORE_LOG_ERROR("Error in #:# - #", file, line, static_cast<int>(e));
|
|
|
}
|
|
|
|
|
@@ -47,7 +53,10 @@ int main() {
|
|
|
Core::ArrayTests::test();
|
|
|
Core::BitArrayTests::test();
|
|
|
Core::BoxTests::test();
|
|
|
+ Core::BufferTests::test();
|
|
|
Core::BufferedValueTests::test();
|
|
|
+ Core::ClockTests::test();
|
|
|
+ Core::ColorTests::test();
|
|
|
Core::ComponentsTests::test();
|
|
|
Core::FrustumTests::test();
|
|
|
Core::HashMapTests::test();
|
|
@@ -58,6 +67,7 @@ int main() {
|
|
|
Core::MatrixTests::test();
|
|
|
Core::PlaneTests::test();
|
|
|
Core::QuaternionTests::test();
|
|
|
+ Core::RandomTests::test();
|
|
|
Core::RingBufferTests::test();
|
|
|
Core::StackTests::test();
|
|
|
Core::UniquePointerTests::test();
|
|
@@ -65,11 +75,9 @@ int main() {
|
|
|
Core::VectorTests::test();
|
|
|
Core::ViewTests::test();
|
|
|
|
|
|
- Core::Test::finalize();
|
|
|
-
|
|
|
- unsigned int data = 0x1234;
|
|
|
+ unsigned int data = 123456789;
|
|
|
Core::setExitHandler(onExit, &data);
|
|
|
- CORE_EXIT(0);
|
|
|
+ CORE_EXIT(1);
|
|
|
|
|
|
return 0;
|
|
|
}
|