xref: /netbsd-src/external/bsd/ntp/dist/sntp/tests/run-t-log.c (revision 56f2724e8b3d0a7f0bf50fb521c1043c1f9f007c)
1 /*	$NetBSD: run-t-log.c,v 1.1.1.4 2018/04/07 00:15:53 christos Exp $	*/
2 
3 /* AUTOGENERATED FILE. DO NOT EDIT. */
4 
5 //=======Test Runner Used To Run Each Test Below=====
6 #define RUN_TEST(TestFunc, TestLineNum) \
7 { \
8   Unity.CurrentTestName = #TestFunc; \
9   Unity.CurrentTestLineNumber = TestLineNum; \
10   Unity.NumberOfTests++; \
11   if (TEST_PROTECT()) \
12   { \
13       setUp(); \
14       TestFunc(); \
15   } \
16   if (TEST_PROTECT() && !TEST_IS_IGNORED) \
17   { \
18     tearDown(); \
19   } \
20   UnityConcludeTest(); \
21 }
22 
23 //=======Automagically Detected Files To Include=====
24 #include "unity.h"
25 #include <setjmp.h>
26 #include <stdio.h>
27 #include "config.h"
28 #include "ntp_types.h"
29 
30 //=======External Functions This Runner Calls=====
31 extern void setUp(void);
32 extern void tearDown(void);
33 extern void testChangePrognameInMysyslog(void);
34 extern void testOpenLogfileTest(void);
35 extern void testWriteInCustomLogfile(void);
36 
37 
38 //=======Suite Setup=====
39 static void suite_setup(void)
40 {
41 extern int change_logfile(const char*, int);
42 change_logfile("stderr", 0);
43 }
44 
45 //=======Test Reset Option=====
46 void resetTest(void);
47 void resetTest(void)
48 {
49   tearDown();
50   setUp();
51 }
52 
53 char const *progname;
54 
55 
56 //=======MAIN=====
57 int main(int argc, char *argv[])
58 {
59   progname = argv[0];
60   suite_setup();
61   UnityBegin("t-log.c");
62   RUN_TEST(testChangePrognameInMysyslog, 10);
63   RUN_TEST(testOpenLogfileTest, 11);
64   RUN_TEST(testWriteInCustomLogfile, 12);
65 
66   return (UnityEnd());
67 }
68