Changed the module `TriacOut` --> `EnOut`

This commit is contained in:
jakeg00dwin 2024-09-14 13:05:27 -07:00
parent e886fbb0c1
commit 4d077a2ef6
4 changed files with 20 additions and 20 deletions

View File

@ -9,7 +9,7 @@ add_subdirectory(MockRegEdit)
add_subdirectory(RegEdit) add_subdirectory(RegEdit)
add_subdirectory(simple_test) add_subdirectory(simple_test)
add_subdirectory(zero_cross_detection) add_subdirectory(zero_cross_detection)
add_subdirectory(TriacOut) add_subdirectory(EnOut)
add_subdirectory(load) add_subdirectory(load)
@ -43,12 +43,12 @@ target_link_libraries(Mock_Tests
) )
add_executable(TriacTests add_executable(EnTests
TriacTests.cpp EnTests.cpp
) )
target_link_libraries(TriacTests target_link_libraries(EnTests
${CPPUTEST_LIBRARIES}/libCppUTest.a ${CPPUTEST_LIBRARIES}/libCppUTest.a
${CPPUTEST_LIBRARIES}/libCppUTestExt.a ${CPPUTEST_LIBRARIES}/libCppUTestExt.a
test_TriacOut test_EnOut
) )

View File

@ -1,12 +1,12 @@
# TEST_RUNNER # TEST_RUNNER
add_library(test_TriacOut add_library(test_EnOut
test_TriacOut.cpp test_EnOut.cpp
) )
target_link_libraries(test_TriacOut target_link_libraries(test_EnOut
${CPPUTEST_LIBRARIES}/libCppUTest.a ${CPPUTEST_LIBRARIES}/libCppUTest.a
${CPPUTEST_LIBRARIES}/libCppUTestExt.a ${CPPUTEST_LIBRARIES}/libCppUTestExt.a
MockRegEdit MockRegEdit
TriacOut EnOut
) )

View File

@ -1,7 +1,7 @@
/* /*
* Author: username * Author: username
* Date: todays_date * Date: todays_date
* filename: test_TriacOut.c * filename: test_EnOut.c
* description: module_purpose * description: module_purpose
*/ */
@ -14,7 +14,7 @@
extern "C" extern "C"
{ {
#include <iotn404.h> #include <iotn404.h>
#include "TriacOut.h" #include "EnOut.h"
#include "MockRegEdit.h" #include "MockRegEdit.h"
} }
@ -27,7 +27,7 @@ void FakeDelay(double us)
void (*Delay_MicroSeconds)(double us) = FakeDelay; void (*Delay_MicroSeconds)(double us) = FakeDelay;
TEST_GROUP(test_TriacOut) TEST_GROUP(test_EnOut)
{ {
void setup() void setup()
{ {
@ -40,13 +40,13 @@ TEST_GROUP(test_TriacOut)
} }
}; };
TEST(test_TriacOut, FirstTest) TEST(test_EnOut, FirstTest)
{ {
//FAIL("Fail me!"); //FAIL("Fail me!");
CHECK(true); CHECK(true);
} }
TEST(test_TriacOut, TriacOut_SetupPins) TEST(test_EnOut, EnOut_SetupPins)
{ {
//Expect that pin PA1 is set to output //Expect that pin PA1 is set to output
mock().expectOneCall("RegEdit_SetBit") mock().expectOneCall("RegEdit_SetBit")
@ -54,21 +54,21 @@ TEST(test_TriacOut, TriacOut_SetupPins)
.withUnsignedIntParameter("bit_num", G1); .withUnsignedIntParameter("bit_num", G1);
TriacOut_SetupPins(); EnOut_SetupPins();
} }
TEST(test_TriacOut, TriacOut_SetAllHigh) TEST(test_EnOut, EnOut_SetAllHigh)
{ {
//Expect that pin PA1 is set to output //Expect that pin PA1 is set to output
mock().expectOneCall("RegEdit_SetBit") mock().expectOneCall("RegEdit_SetBit")
.withPointerParameter("reg", (void *) &PORTA.OUT) .withPointerParameter("reg", (void *) &PORTA.OUT)
.withUnsignedIntParameter("bit_num", G1); .withUnsignedIntParameter("bit_num", G1);
TriacOut_SetAllHigh(); EnOut_SetAllHigh();
} }
TEST(test_TriacOut, TriacOut_PulsePins) TEST(test_EnOut, EnOut_PulsePins)
{ {
//Expect that pin PA1 is set to output //Expect that pin PA1 is set to output
@ -76,5 +76,5 @@ TEST(test_TriacOut, TriacOut_PulsePins)
.withPointerParameter("reg", (void *) &PORTA.OUT) .withPointerParameter("reg", (void *) &PORTA.OUT)
.withUnsignedIntParameter("bit_num", G1); .withUnsignedIntParameter("bit_num", G1);
TriacOut_PulsePins(1000); EnOut_PulsePins(1000);
} }

View File

@ -1,6 +1,6 @@
#include "CppUTest/CommandLineTestRunner.h" #include "CppUTest/CommandLineTestRunner.h"
IMPORT_TEST_GROUP(test_TriacOut); IMPORT_TEST_GROUP(test_EnOut);
//START: main //START: main