diff options
| author | Fuwn <[email protected]> | 2026-02-26 10:24:00 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-26 10:31:15 -0800 |
| commit | a14f361a60f55299e0057c419cc59e5194a77854 (patch) | |
| tree | edf54089f5849ee4dfdac48bd04bd8c271cfb62a /lab_6/unity/examples/example_3/test/no_ruby | |
| parent | feat(homework_2): Add implementation (diff) | |
| download | cst456-a14f361a60f55299e0057c419cc59e5194a77854.tar.xz cst456-a14f361a60f55299e0057c419cc59e5194a77854.zip | |
feat(lab_6): Add initial files
Diffstat (limited to 'lab_6/unity/examples/example_3/test/no_ruby')
| -rw-r--r-- | lab_6/unity/examples/example_3/test/no_ruby/TestProductionCode2_Runner.c | 33 | ||||
| -rw-r--r-- | lab_6/unity/examples/example_3/test/no_ruby/TestProductionCode_Runner.c | 37 |
2 files changed, 70 insertions, 0 deletions
diff --git a/lab_6/unity/examples/example_3/test/no_ruby/TestProductionCode2_Runner.c b/lab_6/unity/examples/example_3/test/no_ruby/TestProductionCode2_Runner.c new file mode 100644 index 0000000..4d67701 --- /dev/null +++ b/lab_6/unity/examples/example_3/test/no_ruby/TestProductionCode2_Runner.c @@ -0,0 +1,33 @@ +/* AUTOGENERATED FILE. DO NOT EDIT. */ +#include "unity.h" +#include <setjmp.h> +#include <stdio.h> + +char MessageBuffer[50]; + +extern void setUp(void); +extern void tearDown(void); + +extern void test_IgnoredTest(void); +extern void test_AnotherIgnoredTest(void); +extern void test_ThisFunctionHasNotBeenTested_NeedsToBeImplemented(void); + +void resetTest(void); +void resetTest(void) +{ + tearDown(); + setUp(); +} + + +int main(void) +{ + UnityBegin("test/TestProductionCode2.c"); + + RUN_TEST(test_IgnoredTest, 13); + RUN_TEST(test_AnotherIgnoredTest, 18); + RUN_TEST(test_ThisFunctionHasNotBeenTested_NeedsToBeImplemented, 23); + + UnityEnd(); + return 0; +} diff --git a/lab_6/unity/examples/example_3/test/no_ruby/TestProductionCode_Runner.c b/lab_6/unity/examples/example_3/test/no_ruby/TestProductionCode_Runner.c new file mode 100644 index 0000000..0a795ec --- /dev/null +++ b/lab_6/unity/examples/example_3/test/no_ruby/TestProductionCode_Runner.c @@ -0,0 +1,37 @@ +/* AUTOGENERATED FILE. DO NOT EDIT. */ +#include "unity.h" +#include <setjmp.h> +#include <stdio.h> + +char MessageBuffer[50]; + +extern void setUp(void); +extern void tearDown(void); + +extern void test_FindFunction_WhichIsBroken_ShouldReturnZeroIfItemIsNotInList_WhichWorksEvenInOurBrokenCode(void); +extern void test_FindFunction_WhichIsBroken_ShouldReturnTheIndexForItemsInList_WhichWillFailBecauseOurFunctionUnderTestIsBroken(void); +extern void test_FunctionWhichReturnsLocalVariable_ShouldReturnTheCurrentCounterValue(void); +extern void test_FunctionWhichReturnsLocalVariable_ShouldReturnTheCurrentCounterValueAgain(void); +extern void test_FunctionWhichReturnsLocalVariable_ShouldReturnCurrentCounter_ButFailsBecauseThisTestIsActuallyFlawed(void); + +void resetTest(void); +void resetTest(void) +{ + tearDown(); + setUp(); +} + + +int main(void) +{ + UnityBegin("test/TestProductionCode.c"); + + RUN_TEST(test_FindFunction_WhichIsBroken_ShouldReturnZeroIfItemIsNotInList_WhichWorksEvenInOurBrokenCode, 20); + RUN_TEST(test_FindFunction_WhichIsBroken_ShouldReturnTheIndexForItemsInList_WhichWillFailBecauseOurFunctionUnderTestIsBroken, 30); + RUN_TEST(test_FunctionWhichReturnsLocalVariable_ShouldReturnTheCurrentCounterValue, 41); + RUN_TEST(test_FunctionWhichReturnsLocalVariable_ShouldReturnTheCurrentCounterValueAgain, 51); + RUN_TEST(test_FunctionWhichReturnsLocalVariable_ShouldReturnCurrentCounter_ButFailsBecauseThisTestIsActuallyFlawed, 57); + + UnityEnd(); + return 0; +} |