]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
added run-test-libntp.c
authorDamir Tomic <viperus@ntp.org>
Tue, 26 May 2015 09:31:22 +0000 (09:31 +0000)
committerDamir Tomic <viperus@ntp.org>
Tue, 26 May 2015 09:31:22 +0000 (09:31 +0000)
bk: 55643d6atsps1EMidXPTOeFVGYmF0A

tests/libntp/run-test-libntp.c [new file with mode: 0644]

diff --git a/tests/libntp/run-test-libntp.c b/tests/libntp/run-test-libntp.c
new file mode 100644 (file)
index 0000000..32ba456
--- /dev/null
@@ -0,0 +1,50 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+
+//=======Test Runner Used To Run Each Test Below=====
+#define RUN_TEST(TestFunc, TestLineNum) \
+{ \
+  Unity.CurrentTestName = #TestFunc; \
+  Unity.CurrentTestLineNumber = TestLineNum; \
+  Unity.NumberOfTests++; \
+  if (TEST_PROTECT()) \
+  { \
+      setUp(); \
+      TestFunc(); \
+  } \
+  if (TEST_PROTECT() && !TEST_IS_IGNORED) \
+  { \
+    tearDown(); \
+  } \
+  UnityConcludeTest(); \
+}
+
+//=======Automagically Detected Files To Include=====
+#include "unity.h"
+#include <setjmp.h>
+#include <stdio.h>
+
+//=======External Functions This Runner Calls=====
+extern void setUp(void);
+extern void tearDown(void);
+extern void test_modetoa(void);
+extern void test_uglydate(void);
+
+
+//=======Test Reset Option=====
+void resetTest()
+{
+  tearDown();
+  setUp();
+}
+
+
+//=======MAIN=====
+int main(void)
+{
+  Unity.TestFile = "test-libntp.c";
+  UnityBegin("");
+  RUN_TEST(test_modetoa, 16);
+  RUN_TEST(test_uglydate, 25);
+
+  return (UnityEnd());
+}