1*eabc0478Schristos /* $NetBSD: run-leapsec.c,v 1.4 2024/08/18 20:47:27 christos Exp $ */ 248f8ae19Schristos 3a6f3f22fSchristos /* AUTOGENERATED FILE. DO NOT EDIT. */ 4a6f3f22fSchristos 5a6f3f22fSchristos //=======Test Runner Used To Run Each Test Below===== 6a6f3f22fSchristos #define RUN_TEST(TestFunc, TestLineNum) \ 7a6f3f22fSchristos { \ 8a6f3f22fSchristos Unity.CurrentTestName = #TestFunc; \ 9a6f3f22fSchristos Unity.CurrentTestLineNumber = TestLineNum; \ 10a6f3f22fSchristos Unity.NumberOfTests++; \ 11a6f3f22fSchristos if (TEST_PROTECT()) \ 12a6f3f22fSchristos { \ 13a6f3f22fSchristos setUp(); \ 14a6f3f22fSchristos TestFunc(); \ 15a6f3f22fSchristos } \ 16a6f3f22fSchristos if (TEST_PROTECT() && !TEST_IS_IGNORED) \ 17a6f3f22fSchristos { \ 18a6f3f22fSchristos tearDown(); \ 19a6f3f22fSchristos } \ 20a6f3f22fSchristos UnityConcludeTest(); \ 21a6f3f22fSchristos } 22a6f3f22fSchristos 23a6f3f22fSchristos //=======Automagically Detected Files To Include===== 24a6f3f22fSchristos #include "unity.h" 25a6f3f22fSchristos #include <setjmp.h> 26a6f3f22fSchristos #include <stdio.h> 27a6f3f22fSchristos #include "config.h" 28a6f3f22fSchristos #include "ntp.h" 29a6f3f22fSchristos #include "ntp_calendar.h" 30a6f3f22fSchristos #include "ntp_stdlib.h" 31a6f3f22fSchristos #include "ntp_leapsec.h" 32a6f3f22fSchristos #include "test-libntp.h" 33a6f3f22fSchristos #include <string.h> 34a6f3f22fSchristos 35a6f3f22fSchristos //=======External Functions This Runner Calls===== 36a6f3f22fSchristos extern void setUp(void); 37a6f3f22fSchristos extern void tearDown(void); 38a6f3f22fSchristos extern void test_ValidateGood(void); 39a6f3f22fSchristos extern void test_ValidateNoHash(void); 40a6f3f22fSchristos extern void test_ValidateBad(void); 41a6f3f22fSchristos extern void test_ValidateMalformed(void); 42a6f3f22fSchristos extern void test_ValidateMalformedShort(void); 43a6f3f22fSchristos extern void test_ValidateNoLeadZero(void); 44a6f3f22fSchristos extern void test_tableSelect(void); 45a6f3f22fSchristos extern void test_loadFileExpire(void); 46a6f3f22fSchristos extern void test_loadFileTTL(void); 47a6f3f22fSchristos extern void test_lsQueryPristineState(void); 48a6f3f22fSchristos extern void test_ls2009faraway(void); 49a6f3f22fSchristos extern void test_ls2009weekaway(void); 50a6f3f22fSchristos extern void test_ls2009houraway(void); 51a6f3f22fSchristos extern void test_ls2009secaway(void); 52a6f3f22fSchristos extern void test_ls2009onspot(void); 53a6f3f22fSchristos extern void test_ls2009nodata(void); 54a6f3f22fSchristos extern void test_ls2009limdata(void); 55a6f3f22fSchristos extern void test_qryJumpFarAhead(void); 56a6f3f22fSchristos extern void test_qryJumpAheadToTransition(void); 57a6f3f22fSchristos extern void test_qryJumpAheadOverTransition(void); 58a6f3f22fSchristos extern void test_addDynamic(void); 59a6f3f22fSchristos extern void test_taiEmptyTable(void); 60a6f3f22fSchristos extern void test_taiTableFixed(void); 61a6f3f22fSchristos extern void test_taiTableDynamic(void); 62a6f3f22fSchristos extern void test_taiTableDynamicDeadZone(void); 63a6f3f22fSchristos extern void test_ls2009seqInsElectric(void); 64a6f3f22fSchristos extern void test_ls2009seqInsDumb(void); 65a6f3f22fSchristos extern void test_ls2009seqDelElectric(void); 66a6f3f22fSchristos extern void test_ls2009seqDelDumb(void); 67a6f3f22fSchristos extern void test_ls2012seqInsElectric(void); 68a6f3f22fSchristos extern void test_ls2012seqInsDumb(void); 69a6f3f22fSchristos extern void test_lsEmptyTableDumb(void); 70a6f3f22fSchristos extern void test_lsEmptyTableElectric(void); 71a6f3f22fSchristos 72a6f3f22fSchristos 7356f2724eSchristos //=======Suite Setup===== 7456f2724eSchristos static void suite_setup(void) 7556f2724eSchristos { 76cdfa2a7eSchristos extern int change_iobufs(int); 7756f2724eSchristos extern int change_logfile(const char*, int); 78cdfa2a7eSchristos change_iobufs(1); 7956f2724eSchristos change_logfile("stderr", 0); 8056f2724eSchristos } 8156f2724eSchristos 82a6f3f22fSchristos //=======Test Reset Option===== 83a6f3f22fSchristos void resetTest(void); 84a6f3f22fSchristos void resetTest(void) 85a6f3f22fSchristos { 86a6f3f22fSchristos tearDown(); 87a6f3f22fSchristos setUp(); 88a6f3f22fSchristos } 89a6f3f22fSchristos 90a6f3f22fSchristos char const *progname; 91a6f3f22fSchristos 92a6f3f22fSchristos 93a6f3f22fSchristos //=======MAIN===== 94a6f3f22fSchristos int main(int argc, char *argv[]) 95a6f3f22fSchristos { 96a6f3f22fSchristos progname = argv[0]; 9756f2724eSchristos suite_setup(); 98a6f3f22fSchristos UnityBegin("leapsec.c"); 99*eabc0478Schristos RUN_TEST(test_ValidateGood, 328); 100*eabc0478Schristos RUN_TEST(test_ValidateNoHash, 338); 101*eabc0478Schristos RUN_TEST(test_ValidateBad, 348); 102*eabc0478Schristos RUN_TEST(test_ValidateMalformed, 358); 103*eabc0478Schristos RUN_TEST(test_ValidateMalformedShort, 368); 104*eabc0478Schristos RUN_TEST(test_ValidateNoLeadZero, 378); 105*eabc0478Schristos RUN_TEST(test_tableSelect, 393); 106*eabc0478Schristos RUN_TEST(test_loadFileExpire, 430); 107*eabc0478Schristos RUN_TEST(test_loadFileTTL, 448); 108*eabc0478Schristos RUN_TEST(test_lsQueryPristineState, 481); 109*eabc0478Schristos RUN_TEST(test_ls2009faraway, 495); 110*eabc0478Schristos RUN_TEST(test_ls2009weekaway, 514); 111*eabc0478Schristos RUN_TEST(test_ls2009houraway, 533); 112*eabc0478Schristos RUN_TEST(test_ls2009secaway, 552); 113*eabc0478Schristos RUN_TEST(test_ls2009onspot, 571); 114*eabc0478Schristos RUN_TEST(test_ls2009nodata, 590); 115*eabc0478Schristos RUN_TEST(test_ls2009limdata, 609); 116*eabc0478Schristos RUN_TEST(test_qryJumpFarAhead, 632); 117*eabc0478Schristos RUN_TEST(test_qryJumpAheadToTransition, 655); 118*eabc0478Schristos RUN_TEST(test_qryJumpAheadOverTransition, 678); 119*eabc0478Schristos RUN_TEST(test_addDynamic, 705); 120*eabc0478Schristos RUN_TEST(test_taiEmptyTable, 891); 121*eabc0478Schristos RUN_TEST(test_taiTableFixed, 905); 122*eabc0478Schristos RUN_TEST(test_taiTableDynamic, 919); 123*eabc0478Schristos RUN_TEST(test_taiTableDynamicDeadZone, 947); 124*eabc0478Schristos RUN_TEST(test_ls2009seqInsElectric, 969); 125*eabc0478Schristos RUN_TEST(test_ls2009seqInsDumb, 1014); 126*eabc0478Schristos RUN_TEST(test_ls2009seqDelElectric, 1063); 127*eabc0478Schristos RUN_TEST(test_ls2009seqDelDumb, 1108); 128*eabc0478Schristos RUN_TEST(test_ls2012seqInsElectric, 1152); 129*eabc0478Schristos RUN_TEST(test_ls2012seqInsDumb, 1197); 130*eabc0478Schristos RUN_TEST(test_lsEmptyTableDumb, 1248); 131*eabc0478Schristos RUN_TEST(test_lsEmptyTableElectric, 1271); 132a6f3f22fSchristos 133a6f3f22fSchristos return (UnityEnd()); 134a6f3f22fSchristos } 135