1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-24 08:51:36 +01:00
Files
Unity/test/expectdata/testsample_mock_run1.c
2010-09-23 02:39:15 +00:00

76 lines
1.4 KiB
C

/* AUTOGENERATED FILE. DO NOT EDIT. */
#include "unity.h"
#include "cmock.h"
#include "one.h"
#include "two.h"
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
#include "Mockstanky.h"
char MessageBuffer[50];
int GlobalExpectCount;
int GlobalVerifyOrder;
char* GlobalOrderError;
extern void setUp(void);
extern void tearDown(void);
extern void test_TheFirstThingToTest(void);
extern void test_TheSecondThingToTest(void);
static void CMock_Init(void)
{
GlobalExpectCount = 0;
GlobalVerifyOrder = 0;
GlobalOrderError = NULL;
Mockstanky_Init();
}
static void CMock_Verify(void)
{
Mockstanky_Verify();
}
static void CMock_Destroy(void)
{
Mockstanky_Destroy();
}
static void runTest(UnityTestFunction test)
{
if (TEST_PROTECT())
{
CEXCEPTION_T e;
Try {
CMock_Init();
setUp();
test();
CMock_Verify();
} Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); }
}
CMock_Destroy();
if (TEST_PROTECT() && !TEST_IS_IGNORED)
{
tearDown();
}
}
void resetTest()
{
CMock_Verify();
CMock_Destroy();
tearDown();
CMock_Init();
setUp();
}
int main(void)
{
Unity.TestFile = "test/testdata/mocksample.c";
UnityBegin();
// RUN_TEST calls runTest
RUN_TEST(test_TheFirstThingToTest, 21);
RUN_TEST(test_TheSecondThingToTest, 43);
return (UnityEnd());
}