3 Commits

Author SHA1 Message Date
1c39b8eda6 Re-enable color output on Windows. 2025-06-04 14:01:50 -05:00
bae26cf80a Migrate jlog to latest. 2024-12-25 16:36:23 -05:00
76a384b892 Fix for latest jlog
Also remove having to include event directly as it gets passed up from jlog.
2024-10-10 12:08:25 -04:00
4 changed files with 4 additions and 10 deletions

View File

@@ -24,18 +24,11 @@ include(cmake/CPM.cmake)
file(GLOB_RECURSE jtest_HEADERS "include/jtest/*.h" "include/jtest/*.hpp") file(GLOB_RECURSE jtest_HEADERS "include/jtest/*.h" "include/jtest/*.hpp")
file(GLOB_RECURSE jtest_SRC "src/jtest/*.c" "src/jtest/*.cpp") file(GLOB_RECURSE jtest_SRC "src/jtest/*.c" "src/jtest/*.cpp")
# TODO: Fix Event needing to be included too, it should be an automatically-managed depencency of jlog!!!
CPMAddPackage(
NAME Event
URL https://git.redacted.cc/josh/Event/archive/Release-10.zip
)
CPMAddPackage( CPMAddPackage(
NAME jlog NAME jlog
URL https://git.redacted.cc/josh/jlog/archive/Prerelease-16.zip URL https://git.redacted.cc/josh/jlog/archive/Prerelease-19.zip
) )
if (UNIX) if (UNIX)
add_library(jtest SHARED ${jtest_SRC}) add_library(jtest SHARED ${jtest_SRC})
endif() endif()

View File

@@ -1,7 +1,6 @@
#pragma once #pragma once
#include <Event.h> #include <Event.h>
#include <EventConnection.h>
#include <jtest/Test.hpp> #include <jtest/Test.hpp>
#include <jtest/UnitLogger.hpp> #include <jtest/UnitLogger.hpp>

View File

@@ -16,6 +16,8 @@
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
mcolor::windowsSaneify();
jtest::Unit u{"jtest-demo"}; jtest::Unit u{"jtest-demo"};
u += jtest::Test{"check_true", [] () { u += jtest::Test{"check_true", [] () {
jtest::check(true); jtest::check(true);

View File

@@ -21,7 +21,7 @@ namespace jtest {
// TODO: output "Running Test Unit <name> with <N> tests. // TODO: output "Running Test Unit <name> with <N> tests.
Log(std::format("Running test unit with {} tests...", tests_total)); Log(std::format("Running test unit with {} tests...", tests_total));
for (event_ptr &connection_ptr: this->listeners) { for (EventPtr &connection_ptr: this->listeners) {
//ulog(std::format("Running Test <{}> [{}/{}]", connection_ptr->callback.Name(), tcnt, this->listeners.size())); //ulog(std::format("Running Test <{}> [{}/{}]", connection_ptr->callback.Name(), tcnt, this->listeners.size()));
bool this_test_passed = false; bool this_test_passed = false;