run-packetProcessing.c revision 330106
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 "sntptest.h" 27#include "networking.h" 28#include "ntp_stdlib.h" 29 30//=======External Functions This Runner Calls===== 31extern void setUp(void); 32extern void tearDown(void); 33extern void test_TooShortLength(void); 34extern void test_LengthNotMultipleOfFour(void); 35extern void test_TooShortExtensionFieldLength(void); 36extern void test_UnauthenticatedPacketReject(void); 37extern void test_CryptoNAKPacketReject(void); 38extern void test_AuthenticatedPacketInvalid(void); 39extern void test_AuthenticatedPacketUnknownKey(void); 40extern void test_ServerVersionTooOld(void); 41extern void test_ServerVersionTooNew(void); 42extern void test_NonWantedMode(void); 43extern void test_KoDRate(void); 44extern void test_KoDDeny(void); 45extern void test_RejectUnsyncedServer(void); 46extern void test_RejectWrongResponseServerMode(void); 47extern void test_AcceptNoSentPacketBroadcastMode(void); 48extern void test_CorrectUnauthenticatedPacket(void); 49extern void test_CorrectAuthenticatedPacketMD5(void); 50extern void test_CorrectAuthenticatedPacketSHA1(void); 51extern void test_CorrectAuthenticatedPacketCMAC(void); 52 53 54//=======Suite Setup===== 55static void suite_setup(void) 56{ 57extern int change_logfile(const char*, int); 58change_logfile("stderr", 0); 59} 60 61//=======Test Reset Option===== 62void resetTest(void); 63void resetTest(void) 64{ 65 tearDown(); 66 setUp(); 67} 68 69char const *progname; 70 71 72//=======MAIN===== 73int main(int argc, char *argv[]) 74{ 75 progname = argv[0]; 76 suite_setup(); 77 UnityBegin("packetProcessing.c"); 78 RUN_TEST(test_TooShortLength, 23); 79 RUN_TEST(test_LengthNotMultipleOfFour, 24); 80 RUN_TEST(test_TooShortExtensionFieldLength, 25); 81 RUN_TEST(test_UnauthenticatedPacketReject, 26); 82 RUN_TEST(test_CryptoNAKPacketReject, 27); 83 RUN_TEST(test_AuthenticatedPacketInvalid, 28); 84 RUN_TEST(test_AuthenticatedPacketUnknownKey, 29); 85 RUN_TEST(test_ServerVersionTooOld, 30); 86 RUN_TEST(test_ServerVersionTooNew, 31); 87 RUN_TEST(test_NonWantedMode, 32); 88 RUN_TEST(test_KoDRate, 33); 89 RUN_TEST(test_KoDDeny, 34); 90 RUN_TEST(test_RejectUnsyncedServer, 35); 91 RUN_TEST(test_RejectWrongResponseServerMode, 36); 92 RUN_TEST(test_AcceptNoSentPacketBroadcastMode, 37); 93 RUN_TEST(test_CorrectUnauthenticatedPacket, 38); 94 RUN_TEST(test_CorrectAuthenticatedPacketMD5, 39); 95 RUN_TEST(test_CorrectAuthenticatedPacketSHA1, 40); 96 RUN_TEST(test_CorrectAuthenticatedPacketCMAC, 41); 97 98 return (UnityEnd()); 99} 100