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/test/testdata | |
| 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/test/testdata')
| -rw-r--r-- | lab_6/unity/test/testdata/mocksample.c | 51 | ||||
| -rw-r--r-- | lab_6/unity/test/testdata/sample.yml | 9 | ||||
| -rw-r--r-- | lab_6/unity/test/testdata/testsample.c | 51 |
3 files changed, 111 insertions, 0 deletions
diff --git a/lab_6/unity/test/testdata/mocksample.c b/lab_6/unity/test/testdata/mocksample.c new file mode 100644 index 0000000..847d87f --- /dev/null +++ b/lab_6/unity/test/testdata/mocksample.c @@ -0,0 +1,51 @@ +// This is just a sample test file to be used to test the generator script
+#ifndef TEST_SAMPLE_H
+#define TEST_SAMPLE_H
+
+#include <setjmp.h>
+#include "unity.h"
+#include "funky.h"
+#include "Mockstanky.h"
+
+void setUp(void)
+{
+ CustomSetupStuff();
+}
+
+void tearDown(void)
+{
+ CustomTeardownStuff
+}
+
+//Yup, nice comment
+void test_TheFirstThingToTest(void)
+{
+ TEST_ASSERT(1);
+
+ TEST_ASSERT_TRUE(1);
+}
+
+/*
+void test_ShouldBeIgnored(void)
+{
+ DoesStuff();
+}
+*/
+
+//void test_ShouldAlsoNotBeTested(void)
+//{
+// Call_An_Expect();
+//
+// CallAFunction();
+// test_CallAFunctionThatLooksLikeATest();
+//}
+
+void test_TheSecondThingToTest(void)
+{
+ Call_An_Expect();
+
+ CallAFunction();
+ test_CallAFunctionThatLooksLikeATest();
+}
+
+#endif //TEST_SAMPLE_H
diff --git a/lab_6/unity/test/testdata/sample.yml b/lab_6/unity/test/testdata/sample.yml new file mode 100644 index 0000000..52ec96b --- /dev/null +++ b/lab_6/unity/test/testdata/sample.yml @@ -0,0 +1,9 @@ +:unity:
+ :includes:
+ - two.h
+ - three.h
+ - <four.h>
+ :plugins:
+ - :cexception
+ :suite_setup: |
+ a_yaml_setup();
\ No newline at end of file diff --git a/lab_6/unity/test/testdata/testsample.c b/lab_6/unity/test/testdata/testsample.c new file mode 100644 index 0000000..e5a2b18 --- /dev/null +++ b/lab_6/unity/test/testdata/testsample.c @@ -0,0 +1,51 @@ +// This is just a sample test file to be used to test the generator script
+#ifndef TEST_SAMPLE_H
+#define TEST_SAMPLE_H
+
+#include <setjmp.h>
+#include "unity.h"
+#include "funky.h"
+#include "stanky.h"
+
+void setUp(void)
+{
+ CustomSetupStuff();
+}
+
+void tearDown(void)
+{
+ CustomTeardownStuff
+}
+
+//Yup, nice comment
+void test_TheFirstThingToTest(void)
+{
+ TEST_ASSERT(1);
+
+ TEST_ASSERT_TRUE(1);
+}
+
+/*
+void test_ShouldBeIgnored(void)
+{
+ DoesStuff();
+}
+*/
+
+//void test_ShouldAlsoNotBeTested(void)
+//{
+// Call_An_Expect();
+//
+// CallAFunction();
+// test_CallAFunctionThatLooksLikeATest();
+//}
+
+void test_TheSecondThingToTest(void)
+{
+ Call_An_Expect();
+
+ CallAFunction();
+ test_CallAFunctionThatLooksLikeATest();
+}
+
+#endif //TEST_SAMPLE_H
|