mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-22 07:24:28 +08:00
Added example
* Added example that uses unity test fixture
This commit is contained in:
33
examples/example_2/test/TestProductionCode2.c
Normal file
33
examples/example_2/test/TestProductionCode2.c
Normal file
@ -0,0 +1,33 @@
|
||||
#include "ProductionCode2.h"
|
||||
#include "unity.h"
|
||||
#include "unity_fixture.h"
|
||||
|
||||
TEST_GROUP(ProductionCode2);
|
||||
|
||||
/* These should be ignored because they are commented out in various ways:
|
||||
#include "whatever.h"
|
||||
*/
|
||||
//#include "somethingelse.h"
|
||||
|
||||
TEST_SETUP(ProductionCode2)
|
||||
{
|
||||
}
|
||||
|
||||
TEST_TEAR_DOWN(ProductionCode2)
|
||||
{
|
||||
}
|
||||
|
||||
TEST(ProductionCode2, IgnoredTest)
|
||||
{
|
||||
TEST_IGNORE_MESSAGE("This Test Was Ignored On Purpose");
|
||||
}
|
||||
|
||||
TEST(ProductionCode2, AnotherIgnoredTest)
|
||||
{
|
||||
TEST_IGNORE_MESSAGE("These Can Be Useful For Leaving Yourself Notes On What You Need To Do Yet");
|
||||
}
|
||||
|
||||
TEST(ProductionCode2, ThisFunctionHasNotBeenTested_NeedsToBeImplemented)
|
||||
{
|
||||
TEST_IGNORE(); //Like This
|
||||
}
|
Reference in New Issue
Block a user