mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-08-06 13:50:49 +08:00
add link to test_runner file
This commit is contained in:
@ -114,10 +114,10 @@ call.
|
|||||||
|
|
||||||
Remembering to add each test to the main function can get to be tedious. If you
|
Remembering to add each test to the main function can get to be tedious. If you
|
||||||
enjoy using helper scripts in your build process, you might consider making use
|
enjoy using helper scripts in your build process, you might consider making use
|
||||||
of our handy generate_test_runner.rb script. This will create the main function
|
of our handy [generate_test_runner.rb](../auto/generate_test_runner.rb) script.
|
||||||
and all the calls for you, assuming that you have followed the suggested naming
|
This will create the main function and all the calls for you, assuming that you
|
||||||
conventions. In this case, there is no need for you to include the main function
|
have followed the suggested naming conventions. In this case, there is no need
|
||||||
in your test file at all.
|
for you to include the main function in your test file at all.
|
||||||
|
|
||||||
When you're done, your test file will look something like this:
|
When you're done, your test file will look something like this:
|
||||||
|
|
||||||
@ -141,6 +141,7 @@ void test_function_should_doAlsoDoBlah(void) {
|
|||||||
//more test stuff
|
//more test stuff
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// not needed when using generate_test_runner.rb
|
||||||
int main(void) {
|
int main(void) {
|
||||||
UNITY_BEGIN();
|
UNITY_BEGIN();
|
||||||
RUN_TEST(test_function_should_doBlahAndBlah);
|
RUN_TEST(test_function_should_doBlahAndBlah);
|
||||||
|
Reference in New Issue
Block a user