xref: /freebsd/contrib/ntp/tests/libntp/run-digests.c (revision ba3c1f5972d7b90feb6e6da47905ff2757e0fe57)
1 /* AUTOGENERATED FILE. DO NOT EDIT. */
2 
3 //=======Test Runner Used To Run Each Test Below=====
4 #define RUN_TEST(TestFunc, TestLineNum) \
5 { \
6   Unity.CurrentTestName = #TestFunc; \
7   Unity.CurrentTestLineNumber = TestLineNum; \
8   Unity.NumberOfTests++; \
9   if (TEST_PROTECT()) \
10   { \
11       setUp(); \
12       TestFunc(); \
13   } \
14   if (TEST_PROTECT() && !TEST_IS_IGNORED) \
15   { \
16     tearDown(); \
17   } \
18   UnityConcludeTest(); \
19 }
20 
21 //=======Automagically Detected Files To Include=====
22 #include "unity.h"
23 #include <setjmp.h>
24 #include <stdio.h>
25 #include "config.h"
26 #include "ntp.h"
27 #include "ntp_stdlib.h"
28 #include <fcntl.h>
29 #include <sys/types.h>
30 #include <sys/stat.h>
31 #include <unistd.h>
32 
33 //=======External Functions This Runner Calls=====
34 extern void setUp(void);
35 extern void tearDown(void);
36 extern void test_Digest_AES128CMAC(void);
37 extern void test_Digest_MD4(void);
38 extern void test_Digest_MD5(void);
39 extern void test_Digest_MDC2(void);
40 extern void test_Digest_RIPEMD160(void);
41 extern void test_Digest_SHA1(void);
42 extern void test_Digest_SHAKE128(void);
43 
44 
45 //=======Suite Setup=====
46 static void suite_setup(void)
47 {
48 extern int change_iobufs(int);
49 extern int change_logfile(const char*, int);
50 change_iobufs(1);
51 change_logfile("stderr", 0);
52 }
53 
54 //=======Test Reset Option=====
55 void resetTest(void);
56 void resetTest(void)
57 {
58   tearDown();
59   setUp();
60 }
61 
62 char const *progname;
63 
64 
65 //=======MAIN=====
66 int main(int argc, char *argv[])
67 {
68   progname = argv[0];
69   suite_setup();
70   UnityBegin("digests.c");
71   RUN_TEST(test_Digest_AES128CMAC, 131);
72   RUN_TEST(test_Digest_MD4, 168);
73   RUN_TEST(test_Digest_MD5, 205);
74   RUN_TEST(test_Digest_MDC2, 238);
75   RUN_TEST(test_Digest_RIPEMD160, 275);
76   RUN_TEST(test_Digest_SHA1, 314);
77   RUN_TEST(test_Digest_SHAKE128, 353);
78 
79   return (UnityEnd());
80 }
81