Added teardown to PetitCompilerTests to clean up a generated parser after tests.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 30 Oct 2014 23:01:54 +0000
changeset 398 b3e47bab2de6
parent 397 530d98b90b13
child 399 b5b7a6db033b
Added teardown to PetitCompilerTests to clean up a generated parser after tests.
compiler/tests/PetitCompilerTest.st
--- a/compiler/tests/PetitCompilerTest.st	Thu Oct 30 11:35:27 2014 +0000
+++ b/compiler/tests/PetitCompilerTest.st	Thu Oct 30 23:01:54 2014 +0000
@@ -14,6 +14,19 @@
 	^ context := PPCProfilingContext new
 ! !
 
+!PetitCompilerTest methodsFor:'running'!
+
+tearDown
+    | parserClass |
+
+    parserClass := (Smalltalk at: #PPGeneratedParser).
+    parserClass notNil ifTrue:[ 
+        parserClass removeFromSystem
+    ].
+
+    "Created: / 30-10-2014 / 22:56:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !PetitCompilerTest methodsFor:'test support'!
 
 assert: p parse: whatever