Tests

We use unit test suites to verify the correctness of our virtual machine. Here you can access the source code of the tests.

BodyTestSuite

FacTest Recursive implementation of the factorial function using class redefinition.

RefactorActiveMethodTest
RedefinePrivateMethodTest Tests redefinition of a class such that old code still accesses a redefined private method.
SimpleStaticTest
StaticTest
FibTest Recursive implementation of the fibonacci function using class redefinition.

MultipleThreadsTest Class for testing redefining methods of classes that extend the Thread class. In the test setup the run method
calls the doit method in a loop until this methods returns false.

EMCPTest
OldActivationTest Stress test for the number of old activations on the stack. In the test setup 10 different versions of the method A.value will be on the stack.

StressTest

EvalTestSuite

AddingInterfaceTest Adds an implemented interface to a class and tests whether an instance of this class can then really be treated as an instance of the interface. Additionally, performs performance measurements of a call to this interface compared to a proxy object.
FractionTest

StructuralTestSuite

HierarchySwapTest Smallest test case for a hierarchy swap. A
TypeNarrowingMethodTest Test case for type narrowing where a non-active method fails verification because of the new hierarchy.
InterfaceTest Tests for adding an interface to a class and for changing the methods of an interface.

LargeHierarchyTest Tests that modify a large class hierarchy with the classes A, B, C, D, E, and F.

TypeNarrowingHeapTest Test case for type narrowing.

MethodsTestSuite

CallDeletedInterfaceMethodTest Test case that calls an interface method that was deleted through class redefinition.
OverrideMethodTest Tests for the class relationship A
ReflectionTest Testing correct reflection functionality after class redefinition.

DeleteActiveMethodTest Test cases that delete a method that is currently active on the stack.

SingleClassReflectionTest Testing correct behaviour of the class object after class redefinition (with respect to the identity hash code and synchronization).
OldCodeNonOSRTest Test case that makes sure that old code does not get on-stack-replaced.
CallDeletedMethodTest Test case that calls a virtual method that was deleted through class redefinition.

SingleClassTest Tests for adding / removing methods in a single class.

NativesTestSuite

SimpleNativeTest Testing correct resolving of a native method after class redefinition.

FieldsTestSuite

FieldChangedOrderTest Test that changes the order of two int fields.

ObjectStressTest
FieldModificationTest
AccessDeletedStaticFieldTest Tests for accessing a deleted static field.
YieldTest Test case that produces a list of integer values recursively.
The recursive function does not contain a conditional statement.
The recursion is stopped by swapping the recursive method with a different non-recursive implementation.

AccessDeletedFieldTest Tests for accessing a deleted field. In the first scenario, the field is deleted from the class.
In the second scenario, it is deleted because of a changed subtype relationship.

ComplexFieldTest Complex field test.
StringFieldTest Complex field test.
RedefinePrivateFieldTest Tests redefinition of a class such that old code still accesses a redefined private field.

TransformerTestSuite

StaticTransformerTest Tests for executing the transformer of a class.
BaseClassTransformerTest Tests for executing the transformer of a base class.
SimpleTransformerTest Tests for executing the transformer of a class.

AccessTestSuite

AccessTest

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>