summaryrefslogtreecommitdiff
path: root/contrib/ntp/tests/libntp/run-timevalops.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/tests/libntp/run-timevalops.c')
-rw-r--r--contrib/ntp/tests/libntp/run-timevalops.c105
1 files changed, 105 insertions, 0 deletions
diff --git a/contrib/ntp/tests/libntp/run-timevalops.c b/contrib/ntp/tests/libntp/run-timevalops.c
new file mode 100644
index 0000000000000..013aae1f2a52e
--- /dev/null
+++ b/contrib/ntp/tests/libntp/run-timevalops.c
@@ -0,0 +1,105 @@
+/* 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_Helpers1();
+extern void test_Normalise();
+extern void test_SignNoFrac();
+extern void test_SignWithFrac();
+extern void test_CmpFracEQ();
+extern void test_CmpFracGT();
+extern void test_CmpFracLT();
+extern void test_AddFullNorm();
+extern void test_AddFullOflow1();
+extern void test_AddUsecNorm();
+extern void test_AddUsecOflow1();
+extern void test_SubFullNorm();
+extern void test_SubFullOflow();
+extern void test_SubUsecNorm();
+extern void test_SubUsecOflow();
+extern void test_Neg();
+extern void test_AbsNoFrac();
+extern void test_AbsWithFrac();
+extern void test_Helpers2();
+extern void test_ToLFPbittest();
+extern void test_ToLFPrelPos();
+extern void test_ToLFPrelNeg();
+extern void test_ToLFPabs();
+extern void test_FromLFPbittest();
+extern void test_FromLFPrelPos();
+extern void test_FromLFPrelNeg();
+extern void test_LFProundtrip();
+extern void test_ToString();
+
+
+//=======Test Reset Option=====
+void resetTest()
+{
+ tearDown();
+ setUp();
+}
+
+char *progname;
+
+
+//=======MAIN=====
+int main(int argc, char *argv[])
+{
+ progname = argv[0];
+ Unity.TestFile = "timevalops.c";
+ UnityBegin("timevalops.c");
+ RUN_TEST(test_Helpers1, 153);
+ RUN_TEST(test_Normalise, 173);
+ RUN_TEST(test_SignNoFrac, 187);
+ RUN_TEST(test_SignWithFrac, 199);
+ RUN_TEST(test_CmpFracEQ, 214);
+ RUN_TEST(test_CmpFracGT, 228);
+ RUN_TEST(test_CmpFracLT, 242);
+ RUN_TEST(test_AddFullNorm, 260);
+ RUN_TEST(test_AddFullOflow1, 274);
+ RUN_TEST(test_AddUsecNorm, 288);
+ RUN_TEST(test_AddUsecOflow1, 300);
+ RUN_TEST(test_SubFullNorm, 316);
+ RUN_TEST(test_SubFullOflow, 330);
+ RUN_TEST(test_SubUsecNorm, 344);
+ RUN_TEST(test_SubUsecOflow, 356);
+ RUN_TEST(test_Neg, 372);
+ RUN_TEST(test_AbsNoFrac, 389);
+ RUN_TEST(test_AbsWithFrac, 400);
+ RUN_TEST(test_Helpers2, 416);
+ RUN_TEST(test_ToLFPbittest, 449);
+ RUN_TEST(test_ToLFPrelPos, 464);
+ RUN_TEST(test_ToLFPrelNeg, 478);
+ RUN_TEST(test_ToLFPabs, 491);
+ RUN_TEST(test_FromLFPbittest, 509);
+ RUN_TEST(test_FromLFPrelPos, 527);
+ RUN_TEST(test_FromLFPrelNeg, 540);
+ RUN_TEST(test_LFProundtrip, 554);
+ RUN_TEST(test_ToString, 573);
+
+ return (UnityEnd());
+}