src/AbstractJavaTestCase.st
branchjk_new_structure
changeset 777 e6e61412ae43
parent 774 ac54730a2b74
child 778 caa3a009f617
--- a/src/AbstractJavaTestCase.st	Thu May 12 17:22:54 2011 +0000
+++ b/src/AbstractJavaTestCase.st	Fri May 13 06:55:55 2011 +0000
@@ -38,6 +38,12 @@
     "Created: / 10-05-2011 / 15:03:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
+getClassRefIn: aJavaConstantPool withNameAt: nameCPIndex
+^ JavaClassRef2 in: aJavaConstantPool withNameAt: nameCPIndex.
+
+    "Created: / 12-05-2011 / 19:14:30 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+!
+
 getCrateClassReadStream
     ^ ((Filename named: UserPreferences current javaTestsDirectory) 
         / 'libjava' / 'bin' 
@@ -56,18 +62,32 @@
         andDescriptorAt: 2.
 
     "Created: / 10-05-2011 / 16:01:13 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+!
+
+getNameAndTypeIn: aJavaConstantPool nameAt: nameCPIndex typeAt: typeCPIndex 
+    ^ JavaNameAndType2 in: aJavaConstantPool withNameAt: nameCPIndex andDescriptorAt: typeCPIndex.
+
+    "Created: / 12-05-2011 / 19:15:17 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+!
+
+javaLangObject
+^Java classForName:'java.lang.Object'.
+
+    "Created: / 12-05-2011 / 19:09:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 ! !
 
 !AbstractJavaTestCase methodsFor:'running'!
 
 setUp
     JavaClassReader useNewClassReader.
+    self enableMockedExceptionThrowing.
 
     "Created: / 12-05-2011 / 17:30:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
 tearDown
     JavaClassReader useOldClassReader.
+    self disableMockedExceptionThrowing.
 
     "Created: / 12-05-2011 / 17:30:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 ! !