From 2628c0be9c909d86b2348bce90c4e64032675cc4 Mon Sep 17 00:00:00 2001 From: jakeg00dwin Date: Sun, 1 Sep 2024 12:23:34 -0700 Subject: [PATCH] Added tests for the SuperLoop in finite iterations mode. --- tests/SuperLoop/test_SuperLoop.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/SuperLoop/test_SuperLoop.cpp b/tests/SuperLoop/test_SuperLoop.cpp index 4b91d33..6955c0f 100644 --- a/tests/SuperLoop/test_SuperLoop.cpp +++ b/tests/SuperLoop/test_SuperLoop.cpp @@ -24,15 +24,13 @@ TEST_GROUP(test_SuperLoop) } }; -TEST(test_SuperLoop, FirstTest) -{ - FAIL("Fail me!"); + +TEST(test_SuperLoop, LoopIterationsFiniteWork){ + for(uint8_t i = 1; i < 255; i++){ + SuperLoop_SetIterations(i); + uint8_t num_iterations = SuperLoop_Run(); + CHECK_EQUAL(i, num_iterations); + } } -TEST(test_SuperLoop, SecondTest) -{ - STRCMP_EQUAL("hello", "world"); - LONGS_EQUAL(1, 2); - CHECK(false); -}