mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-09-27 16:23:29 +08:00
- updated fixture to match James' suggestions.
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@124 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
@ -24,11 +24,7 @@ module RakefileHelpers
|
|||||||
end
|
end
|
||||||
|
|
||||||
def configure_clean
|
def configure_clean
|
||||||
unless $cfg['compiler']['build_path'].nil?
|
CLEAN.include($cfg['compiler']['build_path'] + '*.*') unless $cfg['compiler']['build_path'].nil?
|
||||||
CLEAN.include($cfg['compiler']['build_path'] + "*#{$cfg['compiler']['object_files']['extension']}")
|
|
||||||
CLEAN.include($cfg['compiler']['build_path'] + "*#{$cfg['linker']['bin_files']['extension']}")
|
|
||||||
CLEAN.include($cfg['compiler']['build_path'] + "*.test*")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def configure_toolchain(config_file=DEFAULT_CONFIG_FILE)
|
def configure_toolchain(config_file=DEFAULT_CONFIG_FILE)
|
||||||
@ -151,7 +147,6 @@ module RakefileHelpers
|
|||||||
|
|
||||||
# Get a list of all source files needed
|
# Get a list of all source files needed
|
||||||
src_files = Dir[HERE+'src/*.c']
|
src_files = Dir[HERE+'src/*.c']
|
||||||
src_files += Dir[HERE+'main/*.c']
|
|
||||||
src_files += Dir[HERE+'test/*.c']
|
src_files += Dir[HERE+'test/*.c']
|
||||||
src_files << '../../src/Unity.c'
|
src_files << '../../src/Unity.c'
|
||||||
|
|
||||||
|
@ -116,6 +116,13 @@ void UnityTestRunner(unityfunction* setup,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UnityIgnoreTest()
|
||||||
|
{
|
||||||
|
Unity.NumberOfTests++;
|
||||||
|
Unity.CurrentTestIgnored = 1;
|
||||||
|
UNITY_OUTPUT_CHAR('!');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
//Malloc and free stuff
|
//Malloc and free stuff
|
||||||
@ -371,3 +378,4 @@ void UnityConcludeFixtureTest()
|
|||||||
Unity.CurrentTestFailed = 0;
|
Unity.CurrentTestFailed = 0;
|
||||||
Unity.CurrentTestIgnored = 0;
|
Unity.CurrentTestIgnored = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,24 +25,25 @@ int UnityMain(int argc, char* argv[], void (*runAllTests)());
|
|||||||
|
|
||||||
|
|
||||||
#define TEST(group, name) \
|
#define TEST(group, name) \
|
||||||
void TEST_##group##_##name##_testBody();\
|
void TEST_##group##_##name##_();\
|
||||||
void TEST_##group##_##name##_run()\
|
void TEST_##group##_##name##_run()\
|
||||||
{\
|
{\
|
||||||
UnityTestRunner(TEST_##group##_SETUP,\
|
UnityTestRunner(TEST_##group##_SETUP,\
|
||||||
TEST_##group##_##name##_testBody,\
|
TEST_##group##_##name##_,\
|
||||||
TEST_##group##_TEAR_DOWN,\
|
TEST_##group##_TEAR_DOWN,\
|
||||||
"TEST(" #group ", " #name ")",\
|
"TEST(" #group ", " #name ")",\
|
||||||
#group, #name,\
|
#group, #name,\
|
||||||
__FILE__, __LINE__);\
|
__FILE__, __LINE__);\
|
||||||
}\
|
}\
|
||||||
void TEST_##group##_##name##_testBody()
|
void TEST_##group##_##name##_()
|
||||||
|
|
||||||
#define IGNORE_TEST(group, name) \
|
#define IGNORE_TEST(group, name) \
|
||||||
void TEST_##group##_##name##_testBody();\
|
void TEST_##group##_##name##_();\
|
||||||
void TEST_##group##_##name##_run()\
|
void TEST_##group##_##name##_run()\
|
||||||
{\
|
{\
|
||||||
|
UnityIgnoreTest();\
|
||||||
}\
|
}\
|
||||||
void TEST_##group##_##name##_testBody()
|
void TEST_##group##_##name##_()
|
||||||
|
|
||||||
#define DECLARE_TEST_CASE(group, name) \
|
#define DECLARE_TEST_CASE(group, name) \
|
||||||
void TEST_##group##_##name##_run()
|
void TEST_##group##_##name##_run()
|
||||||
|
@ -25,6 +25,7 @@ void UnityTestRunner(unityfunction * setup,
|
|||||||
const char * name,
|
const char * name,
|
||||||
const char * file, int line);
|
const char * file, int line);
|
||||||
|
|
||||||
|
void UnityIgnoreTest();
|
||||||
void UnityMalloc_StartTest();
|
void UnityMalloc_StartTest();
|
||||||
void UnityMalloc_EndTest();
|
void UnityMalloc_EndTest();
|
||||||
int UnityFailureCount();
|
int UnityFailureCount();
|
||||||
|
@ -318,4 +318,4 @@ TEST(LeakDetection, BufferOverrunFoundDuringRealloc)
|
|||||||
UnityOutputCharSpy_Enable(0);
|
UnityOutputCharSpy_Enable(0);
|
||||||
CHECK(strstr(UnityOutputCharSpy_Get(), "Buffer overrun detected during realloc()"));
|
CHECK(strstr(UnityOutputCharSpy_Get(), "Buffer overrun detected during realloc()"));
|
||||||
Unity.CurrentTestFailed = 0;
|
Unity.CurrentTestFailed = 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user