Added tearDown method to the test suites.

This commit is contained in:
Joey Payne 2015-07-08 08:52:41 -06:00
commit 80e8a1c8c5
3 changed files with 59 additions and 12 deletions

View file

@ -10,9 +10,11 @@ testSuite UnitTests:
self.assertTrue(self.testObj == 400)
method setup()=
self.testObj = 5
self.testObj = 90
method tearDown()=
self.testObj = 0
method testForB()=
var b = 0
self.doThings()
@ -29,9 +31,11 @@ testSuite UnitTestsNew:
testObj: int
method setup()=
self.testObj = 5
self.testObj = 90
method tearDown()=
self.testObj = 0
method testTestObj()=
self.assertTrue(self.testObj == 90)
@ -76,6 +80,11 @@ testSuite MoreInheritance of TestInherit:
# fail. This is expected.
self.testObj = 12345
method tearDown()=
# Calling the direct parent's tearDown method
self.tearDownTestInherit()
self.testObj = 0
method testTestObj()=
# This method is overwritten. To call the base method,
# simply use