Simulated product dispenser

Dependencies:   HTS221

Fork of mbed-cloud-workshop-connect-HTS221 by Jim Carver

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers template_fixture_tests.c Source File

template_fixture_tests.c

00001 //- Copyright (c) 2010 James Grenning and Contributed to Unity Project
00002 /* ==========================================
00003     Unity Project - A Test Framework for C
00004     Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
00005     [Released under MIT License. Please refer to license.txt for details]
00006 ========================================== */
00007 
00008 #include "unity_fixture.h"
00009 
00010 static int data = -1;
00011 
00012 TEST_GROUP(mygroup);
00013 
00014 TEST_SETUP(mygroup)
00015 {
00016     data = 0;
00017 }
00018 
00019 TEST_TEAR_DOWN(mygroup)
00020 {
00021     data = -1;
00022 }
00023 
00024 TEST(mygroup, test1)
00025 {
00026     TEST_ASSERT_EQUAL_INT(0, data);
00027 }
00028 
00029 TEST(mygroup, test2)
00030 {
00031     TEST_ASSERT_EQUAL_INT(0, data);
00032     data = 5;
00033 }
00034 
00035 TEST(mygroup, test3)
00036 {
00037     data = 7;
00038     TEST_ASSERT_EQUAL_INT(7, data);
00039 }