mirror of
https://github.com/ThrowTheSwitch/Unity
synced 2025-01-22 08:18:42 -05:00
40 lines
690 B
C
40 lines
690 B
C
/* =========================================================================
|
|
Unity - A Test Framework for C
|
|
ThrowTheSwitch.org
|
|
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
SPDX-License-Identifier: MIT
|
|
========================================================================= */
|
|
|
|
#include "unity_fixture.h"
|
|
|
|
static int data = -1;
|
|
|
|
TEST_GROUP(mygroup);
|
|
|
|
TEST_SETUP(mygroup)
|
|
{
|
|
data = 0;
|
|
}
|
|
|
|
TEST_TEAR_DOWN(mygroup)
|
|
{
|
|
data = -1;
|
|
}
|
|
|
|
TEST(mygroup, test1)
|
|
{
|
|
TEST_ASSERT_EQUAL_INT(0, data);
|
|
}
|
|
|
|
TEST(mygroup, test2)
|
|
{
|
|
TEST_ASSERT_EQUAL_INT(0, data);
|
|
data = 5;
|
|
}
|
|
|
|
TEST(mygroup, test3)
|
|
{
|
|
data = 7;
|
|
TEST_ASSERT_EQUAL_INT(7, data);
|
|
}
|