diff --git a/Misc/dqn_unit_tests.cpp b/Misc/dqn_unit_tests.cpp index 9b18be2..45a2234 100644 --- a/Misc/dqn_unit_tests.cpp +++ b/Misc/dqn_unit_tests.cpp @@ -1,12 +1,8 @@ -// ------------------------------------------------------------------------------------------------- -// NOTE: Preprocessor Config -// ------------------------------------------------------------------------------------------------- -/* -#define DQN_TEST_WITH_MAIN Define this to enable the main function and allow standalone compiling - and running of the file. -#define DQN_TEST_WITH_KECCAK Define this to enable the main function and allow standalone compiling - and running of the file. -*/ +// NOTE: Preprocessor Config ======================================================================= +// #define DQN_TEST_WITH_MAIN Define this to enable the main function and allow standalone compiling +// and running of the file. +// #define DQN_TEST_WITH_KECCAK Define this to enable the main function and allow standalone compiling +// and running of the file. #if defined(DQN_TEST_WITH_MAIN) #if defined(_MSC_VER) && !defined(__clang__) diff --git a/Misc/dqn_utest.h b/Misc/dqn_utest.h index 2525333..f4b356e 100644 --- a/Misc/dqn_utest.h +++ b/Misc/dqn_utest.h @@ -1,13 +1,12 @@ #if !defined(DQN_UTEST_H) #define DQN_UTEST_H // -// NOTE: Overview -// ----------------------------------------------------------------------------- +// NOTE: Overview ================================================================================== // A super minimal testing framework, most of the logic here is the pretty // printing of test results. -// NOTE: Configuration -// ----------------------------------------------------------------------------- +// NOTE: Configuration ============================================================================= +// // #define DQN_UTEST_IMPLEMENTATION // Define this in one and only one C++ file to enable the implementation // code of the header file. This will also automatically enable the JSMN @@ -33,11 +32,11 @@ // Define this to a terminal color code to specify what color sucess will be // presented as. -// NOTE: Macros -// ----------------------------------------------------------------------------- +// NOTE: Macros ==================================================================================== #include #include #include +#include #if !defined(DQN_UTEST_RESULT_LPAD) #define DQN_UTEST_RESULT_LPAD 90 @@ -122,8 +121,7 @@ } \ } while (0) -// NOTE: Header -// ----------------------------------------------------------------------------- +// NOTE: Header ==================================================================================== typedef enum Dqn_UTestState { Dqn_UTestState_Nil, Dqn_UTestState_TestBegun, @@ -144,8 +142,7 @@ void Dqn_UTest_BeginV(Dqn_UTest *test, char const *fmt, va_list args); void Dqn_UTest_Begin(Dqn_UTest *test, char const *fmt, ...); void Dqn_UTest_End(Dqn_UTest *test); -// NOTE: Implementation -// ----------------------------------------------------------------------------- +// NOTE: Implementation ============================================================================ #if defined(DQN_UTEST_IMPLEMENTATION) void Dqn_UTest_PrintStats(Dqn_UTest *test) { diff --git a/build.bat b/build.bat index 4a0b1de..3049d1b 100644 --- a/build.bat +++ b/build.bat @@ -31,4 +31,7 @@ pushd Build exit /b 0 ) clang-cl %compile_flags% %clang_flags% %code_dir%\Misc\dqn_unit_tests.cpp -I %code_dir% /Fe:dqn_unit_tests_clang %link_flags% || exit /b 1 + + REM Compiler: zig ============================================================================== + REM zig c++ -g -D DQN_TEST_WITH_MAIN -I %code_dir% %code_dir%\Misc\dqn_unit_tests.cpp -o dqn_unit_tests_zig || exit /b 1 popd