generated from TDD-Templates/cmake_cpputest_template_avr
Added the missing test dir for SuperLoop
This commit is contained in:
parent
3f2eb09427
commit
39ce0af7fb
|
@ -0,0 +1,10 @@
|
|||
# TEST_RUNNER
|
||||
add_library(test_SuperLoop
|
||||
test_SuperLoop.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(test_SuperLoop
|
||||
${CPPUTEST_LIBRARIES}/libCppUTest.a
|
||||
${CPPUTEST_LIBRARIES}/libCppUTestExt.a
|
||||
SuperLoop
|
||||
)
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Author: Jake G
|
||||
* Date: 2024-09-01
|
||||
* filename: test_SuperLoop.c
|
||||
* description: module_purpose
|
||||
*/
|
||||
|
||||
#include "CppUTest/CommandLineTestRunner.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "SuperLoop.h"
|
||||
}
|
||||
|
||||
TEST_GROUP(test_SuperLoop)
|
||||
{
|
||||
void setup()
|
||||
{
|
||||
|
||||
}
|
||||
void teardown()
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue