generated from TDD-Templates/cmake_cpputest_template_avr
37 lines
514 B
C++
37 lines
514 B
C++
/*
|
|
* 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);
|
|
}
|
|
}
|
|
|
|
|