testsample.c 814 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
// This is just a sample test file to be used to test the generator script
#ifndef TEST_SAMPLE_H
#define TEST_SAMPLE_H

#include <setjmp.h>
#include "unity.h"
#include "funky.h"
#include "stanky.h"

void setUp(void)
{
  CustomSetupStuff();
}

void tearDown(void)
{
  CustomTeardownStuff
}

//Yup, nice comment
void test_TheFirstThingToTest(void)
{
    TEST_ASSERT(1);

    TEST_ASSERT_TRUE(1);
}

/*
void test_ShouldBeIgnored(void)
{
    DoesStuff();
}
*/

//void test_ShouldAlsoNotBeTested(void)
//{
//    Call_An_Expect();
//    
//    CallAFunction();
//    test_CallAFunctionThatLooksLikeATest();
//}

void test_TheSecondThingToTest(void)
{
    Call_An_Expect();
    
    CallAFunction();
    test_CallAFunctionThatLooksLikeATest();
}

#endif //TEST_SAMPLE_H