1 /* Copyright (c) 2010 James Grenning and Contributed to Unity Project
2 * ==========================================
3 * Unity Project - A Test Framework for C
4 * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
5 * [Released under MIT License. Please refer to license.txt for details]
6 * ========================================== */
7
8 #include "unity_fixture.h"
9
10 static int data = -1;
11
12 TEST_GROUP(mygroup);
13
TEST_SETUP(mygroup)14 TEST_SETUP(mygroup)
15 {
16 data = 0;
17 }
18
TEST_TEAR_DOWN(mygroup)19 TEST_TEAR_DOWN(mygroup)
20 {
21 data = -1;
22 }
23
TEST(mygroup,test1)24 TEST(mygroup, test1)
25 {
26 TEST_ASSERT_EQUAL_INT(0, data);
27 }
28
TEST(mygroup,test2)29 TEST(mygroup, test2)
30 {
31 TEST_ASSERT_EQUAL_INT(0, data);
32 data = 5;
33 }
34
TEST(mygroup,test3)35 TEST(mygroup, test3)
36 {
37 data = 7;
38 TEST_ASSERT_EQUAL_INT(7, data);
39 }
40