From 504582a96d52dc0d00b1888a501e33f4110aa8ca Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 23 Jul 2024 13:13:34 -0400 Subject: [PATCH] nyah --- CMakeLists.txt | 2 +- tests/stack_tests.cpp | 28 ++++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 59a745a..d43491b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.25) -project(blt-gp VERSION 0.0.104) +project(blt-gp VERSION 0.0.105) include(CTest) diff --git a/tests/stack_tests.cpp b/tests/stack_tests.cpp index 1b665fa..a792369 100644 --- a/tests/stack_tests.cpp +++ b/tests/stack_tests.cpp @@ -249,10 +249,16 @@ void test_basic_types() } blt::gp::operation_t basic_2([](float a, float b) { + BLT_ASSERT(a == 50.0f); + BLT_ASSERT(b == 10.0f); return a + b; }); blt::gp::operation_t basic_mixed_4([](float a, float b, bool i, bool p) { + BLT_ASSERT(a == 50.0f); + BLT_ASSERT(b == 10.0f); + BLT_ASSERT(i); + BLT_ASSERT(!p); return (a * (i ? 1.0f : 0.0f)) + (b * (p ? 1.0f : 0.0f)); }); @@ -268,6 +274,24 @@ blt::gp::operation_t large_2048_basic_3b([](const large_2048& l, float a, bool b return blt::black_box_ret(l); }); +blt::gp::operation_t large_4096_basic_3b([](const large_4096& l, float a, bool b) { + blt::black_box(a); + blt::black_box(b); + return blt::black_box_ret(l); +}); + +blt::gp::operation_t large_6123_basic_3b([](const large_6123& l, float a, bool b) { + blt::black_box(a); + blt::black_box(b); + return blt::black_box_ret(l); +}); + +blt::gp::operation_t large_18290_basic_3b([](const large_18290& l, float a, bool b) { + blt::black_box(a); + blt::black_box(b); + return blt::black_box_ret(l); +}); + void test_basic() { BLT_INFO("Testing basic with stack"); @@ -322,15 +346,15 @@ void test_mixed() stack.push(std::array{}); stack.push(50.0f); stack.push(10.0f); - stack.push(false); stack.push(true); + stack.push(false); auto size = stack.size(); BLT_TRACE_STREAM << size << "\n"; BLT_ASSERT(size.blocks > 1 && "Stack doesn't have more than one block!"); basic_mixed_4.make_callable()(nullptr, stack, stack); auto val = stack.pop(); stack.pop>(); - RUN_TEST(val != 10.000000f, stack, "Mixed 4 Boundary Test Passed", "Mixed 4 Test Failed. Unexpected value produced '%lf'", val); + RUN_TEST(val != 50.000000f, stack, "Mixed 4 Boundary Test Passed", "Mixed 4 Test Failed. Unexpected value produced '%lf'", val); BLT_TRACE_STREAM << stack.size() << "\n"; BLT_ASSERT(stack.empty() && "Stack was not empty after basic evaluation over stack boundary"); }