1//#include "bug-2803.h"
2#include "unity.h"
3//#include "code-2803.h"
4
5#define VERSION 5 //change this to 5 and the test wont fail.
6
7
8void setUp(void)
9{
10
11}
12
13void tearDown(void)
14{
15}
16
17/*
18int main( void )
19{
20
21	// loop from {0.0} to {1.1000000} stepping by tv_sec by 1 and tv_usec by 100000
22	test_loop( 0, 0,   1,  MICROSECONDS,   1,  MICROSECONDS / 10 );
23
24	// test_loop( 0, 0,   5,  MICROSECONDS,   1,  MICROSECONDS / 1000 );
25	// test_loop( 0, 0,  -5, -MICROSECONDS,  -1, -MICROSECONDS / 1000 );
26
27	return 0;
28}
29*/
30void test_main( void )
31{
32	TEST_ASSERT_EQUAL(0, main2());
33}
34
35//VERSION defined at the top of the file
36
37void test_XPASS(void)  //expecting fail but passes, should we get an alert about that?
38{
39	//TEST_ABORT
40	TEST_EXPECT_FAIL();
41
42	if(VERSION < 4 ){
43		TEST_FAIL_MESSAGE("expected to fail");
44	}
45
46	else TEST_ASSERT_EQUAL(1,1);
47}
48
49void test_XFAIL(void) //expecting fail, and XFAILs
50{
51
52	TEST_EXPECT_FAIL();
53
54	if(VERSION < 4 ){
55		TEST_FAIL_MESSAGE("Expected to fail");
56	}
57
58	else TEST_ASSERT_EQUAL(1,2);
59}
60
61void test_XFAIL_WITH_MESSAGE(void) //expecting fail, and XFAILs
62{
63	//TEST_ABORT
64	TEST_EXPECT_FAIL_MESSAGE("Doesn't work on this OS");
65
66	if(VERSION < 4 ){
67		TEST_FAIL_MESSAGE("Expected to fail");
68	}
69
70	else TEST_ASSERT_EQUAL(1,2);
71}
72
73void test_main_incorrect(void){
74	TEST_ASSERT_EQUAL(3, main2());
75}
76
77void test_ignored(void){
78	//TEST_IGNORE();
79	TEST_IGNORE_MESSAGE("This test is being ignored!");
80}
81