xref: /freebsd/contrib/ntp/sntp/tests/run-crypto.c (revision 9034852c84a13f0e3b5527e1c886ca94b2863b2b)
1276da39aSCy Schubert /* AUTOGENERATED FILE. DO NOT EDIT. */
2276da39aSCy Schubert 
3276da39aSCy Schubert //=======Test Runner Used To Run Each Test Below=====
4276da39aSCy Schubert #define RUN_TEST(TestFunc, TestLineNum) \
5276da39aSCy Schubert { \
6276da39aSCy Schubert   Unity.CurrentTestName = #TestFunc; \
7276da39aSCy Schubert   Unity.CurrentTestLineNumber = TestLineNum; \
8276da39aSCy Schubert   Unity.NumberOfTests++; \
9276da39aSCy Schubert   if (TEST_PROTECT()) \
10276da39aSCy Schubert   { \
11276da39aSCy Schubert       setUp(); \
12276da39aSCy Schubert       TestFunc(); \
13276da39aSCy Schubert   } \
14276da39aSCy Schubert   if (TEST_PROTECT() && !TEST_IS_IGNORED) \
15276da39aSCy Schubert   { \
16276da39aSCy Schubert     tearDown(); \
17276da39aSCy Schubert   } \
18276da39aSCy Schubert   UnityConcludeTest(); \
19276da39aSCy Schubert }
20276da39aSCy Schubert 
21276da39aSCy Schubert //=======Automagically Detected Files To Include=====
22276da39aSCy Schubert #include "unity.h"
23276da39aSCy Schubert #include <setjmp.h>
24276da39aSCy Schubert #include <stdio.h>
25*9034852cSGleb Smirnoff #include "config.h"
26*9034852cSGleb Smirnoff #include "ntp_types.h"
27*9034852cSGleb Smirnoff #include "sntptest.h"
28*9034852cSGleb Smirnoff #include "crypto.h"
29276da39aSCy Schubert 
30276da39aSCy Schubert //=======External Functions This Runner Calls=====
31276da39aSCy Schubert extern void setUp(void);
32276da39aSCy Schubert extern void tearDown(void);
33276da39aSCy Schubert extern void test_MakeMd5Mac(void);
34276da39aSCy Schubert extern void test_MakeSHA1Mac(void);
35276da39aSCy Schubert extern void test_VerifyCorrectMD5(void);
36276da39aSCy Schubert extern void test_VerifySHA1(void);
37276da39aSCy Schubert extern void test_VerifyFailure(void);
38276da39aSCy Schubert extern void test_PacketSizeNotMultipleOfFourBytes(void);
39276da39aSCy Schubert 
40276da39aSCy Schubert 
41276da39aSCy Schubert //=======Test Reset Option=====
42*9034852cSGleb Smirnoff void resetTest(void);
43*9034852cSGleb Smirnoff void resetTest(void)
44276da39aSCy Schubert {
45276da39aSCy Schubert   tearDown();
46276da39aSCy Schubert   setUp();
47276da39aSCy Schubert }
48276da39aSCy Schubert 
49*9034852cSGleb Smirnoff char const *progname;
50276da39aSCy Schubert 
51276da39aSCy Schubert 
52276da39aSCy Schubert //=======MAIN=====
53276da39aSCy Schubert int main(int argc, char *argv[])
54276da39aSCy Schubert {
55276da39aSCy Schubert   progname = argv[0];
56276da39aSCy Schubert   UnityBegin("crypto.c");
57*9034852cSGleb Smirnoff   RUN_TEST(test_MakeMd5Mac, 12);
58*9034852cSGleb Smirnoff   RUN_TEST(test_MakeSHA1Mac, 13);
59*9034852cSGleb Smirnoff   RUN_TEST(test_VerifyCorrectMD5, 14);
60*9034852cSGleb Smirnoff   RUN_TEST(test_VerifySHA1, 15);
61*9034852cSGleb Smirnoff   RUN_TEST(test_VerifyFailure, 16);
62*9034852cSGleb Smirnoff   RUN_TEST(test_PacketSizeNotMultipleOfFourBytes, 17);
63276da39aSCy Schubert 
64276da39aSCy Schubert   return (UnityEnd());
65276da39aSCy Schubert }
66