File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -598,11 +598,13 @@ <h2><a class="toc-backref" href="#id10">Setup/Teardown</a></h2>
598
598
< dd > < p class ="first "> This function can be be optionally overridden by the user in their test suite.</ p >
599
599
< p class ="last "> If this function exists, it will be called before each test is run. It is
600
600
useful to reset the environment before each test.</ p >
601
+ < p > This function accepts one argument - name of the test that will be executed right after setUp().</ p >
601
602
</ dd >
602
603
< dt > < tt class ="docutils literal "> tearDown</ tt > </ dt >
603
604
< dd > < p class ="first "> This function can be be optionally overridden by the user in their test suite.</ p >
604
605
< p class ="last "> If this function exists, it will be called after each test completes. It is
605
606
useful to clean up the environment after each test.</ p >
607
+ < p > This function accepts one argument - name of the test that has been executed right before this tearDown().</ p >
606
608
</ dd >
607
609
</ dl >
608
610
</ div >
Original file line number Diff line number Diff line change @@ -290,12 +290,18 @@ Setup/Teardown
290
290
If this function exists, it will be called before each test is run. It is
291
291
useful to reset the environment before each test.
292
292
293
+ This function accepts one argument - name of the test that will be executed
294
+ right after setUp().
295
+
293
296
``tearDown ``
294
297
This function can be be optionally overridden by the user in their test suite.
295
298
296
299
If this function exists, it will be called after each test completes. It is
297
300
useful to clean up the environment after each test.
298
301
302
+ This function accepts one argument - name of the test that has been executed
303
+ right before this tearDown().
304
+
299
305
Skipping
300
306
--------
301
307
Original file line number Diff line number Diff line change @@ -671,7 +671,7 @@ suite_addTest()
671
671
# Note: see _shunit_mktempFunc() for actual implementation
672
672
#
673
673
# Args:
674
- # None
674
+ # testName Name of the test that will be executed after this setUp
675
675
# setUp() { :; }
676
676
677
677
# Note: see _shunit_mktempFunc() for actual implementation
@@ -683,7 +683,7 @@ suite_addTest()
683
683
# Note: see _shunit_mktempFunc() for actual implementation
684
684
#
685
685
# Args:
686
- # None
686
+ # testName Name of the test after which this tearDown is executed
687
687
# tearDown() { :; } # DO NOT UNCOMMENT THIS FUNCTION
688
688
689
689
# ------------------------------------------------------------------------------
@@ -798,14 +798,14 @@ _shunit_execSuite()
798
798
endSkipping
799
799
800
800
# execute the per-test setup function
801
- setUp
801
+ setUp " ${_shunit_test_} "
802
802
803
803
# execute the test
804
804
echo " ${_shunit_test_} "
805
805
eval ${_shunit_test_}
806
806
807
807
# execute the per-test tear-down function
808
- tearDown
808
+ tearDown " ${_shunit_test_} "
809
809
810
810
# update stats
811
811
if [ ${__shunit_testSuccess} -eq ${SHUNIT_TRUE} ]; then
You can’t perform that action at this time.
0 commit comments