|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
edu.vub.at.AmbientTalkTest
edu.vub.at.objects.symbiosis.SymbiosisTest
Tests the symbiosis with Java. This is primarily done by wrapping the SymbiosisTest class and instances itself and invoking some of their non-test prefixed methods.
Nested Class Summary | |
private static class |
SymbiosisTest.ExceptionTest
|
Nested classes inherited from class edu.vub.at.AmbientTalkTest |
AmbientTalkTest.Actorscript |
Field Summary | |
private JavaClass |
atTestClass
|
private JavaObject |
atTestObject
|
private JavaPackage |
jLobby_
|
private java.lang.Class |
jTestClass
|
private SymbiosisTest |
jTestObject
|
static int |
TEST_OBJECT_INIT
|
int |
xtest
|
static java.lang.String |
ytest
|
Fields inherited from class edu.vub.at.AmbientTalkTest |
ctx_ |
Fields inherited from class junit.framework.TestCase |
|
Constructor Summary | |
SymbiosisTest()
|
|
SymbiosisTest(AmbientTalkTest t)
|
|
SymbiosisTest(int xval)
|
|
SymbiosisTest(JavaClass c)
|
|
SymbiosisTest(SymbiosisTest t)
|
Method Summary | |
int |
gettertest()
|
boolean |
identitytest(java.lang.Object obj)
|
static void |
main(java.lang.String[] args)
|
java.lang.String |
overloadedmatch2(java.lang.Object x)
|
java.lang.String |
overloadedmatch2(SymbiosisTest x)
|
java.lang.String |
overloadedtest()
|
java.lang.String |
overloadedtest(double x)
|
java.lang.String |
overloadedtest(int x)
|
java.lang.String |
overloadedtest(java.lang.Object[] vals)
|
java.lang.String |
overloadedtest(SymbiosisTest x)
|
java.lang.Object |
overloadedvararg(ATObject[] varargs)
|
int |
overloadedvararg(int x)
|
static java.lang.String |
prefix(java.lang.String msg)
|
void |
settertest(int xval)
|
void |
setUp()
|
void |
testAT2JavaConversion()
Test the conversion function Symbiosis.ambientTalkToJava for various kinds of input. |
void |
testBugfixOverloadedConstructor()
BUGFIX TEST: jlobby.java.lang.StringBuffer.new(10) failed to discriminate between constructors StringBuffer(String) and StringBuffer(int), reason was that anything native was convertible to NATText and also to String. |
void |
testCasting()
Tests casting to manually resolve overloaded method invocations Selecting a method from a Java object results in a JavaClosure instance. |
void |
testCloning()
Tests cloning behaviour for both wrapped class instances and classes. |
void |
testCreationViaJavaObject()
Tests the invocation of new on a wrapped Java Object, rather than on a Java Class. |
void |
testCustomInstanceCreation()
Tests the invocation of new on a wrapped Java Class. |
void |
testExceptionInInstanceCreation()
Tests an instance creation that raises an exception |
void |
testFaultyArity()
Invokes the method 'gettertest' with one argument instead of zero. |
void |
testFirstClassFields()
Tests first-class field access for both instances and classes |
void |
testFirstClassMethods()
Tests first-class method access for both instances and classes |
void |
testIllegalArgs()
Invokes the method 'settertest' with a double (fraction) instead of an int (number) |
void |
testIllegalArgsInstanceCreation()
Tests whether incorrect arguments passed to constructor terminate cleanly. |
void |
testIllegalAssignment()
Tries to assign to a final public field |
void |
testInterfacesAndStripes()
Tests whether Java interface types are correctly treated as AT/2 stripes. |
void |
testJava2ATConversion()
Test the conversion function Symbiosis.javaToAmbientTalk for various kinds of input. |
void |
testJLobbyExplicitClassLoading()
Tests whether lowercase classes can be loaded via the class method of a JavaPackage. |
void |
testJLobbyExplicitPackageLoading()
Tests whether the uppercase package 'foo.Bar' can be loaded via the package method of a JavaPackage. |
void |
testJLobbyNonexistentClassLoading()
Tests whether access to a nonexistent class gives rise to a selector not found exception. |
void |
testJLobbyPackageLoading()
Tests whether jlobby.java results in a new JavaPackage. |
void |
testNonExistentMethod()
Invokes a method that is not defined in the class. |
void |
testNonInstantiatableCreation()
Tests whether classes with private constructors terminate cleanly. |
void |
testOverloadedInstanceCreation()
Tests whether overloaded constructors which cannot be resolved terminates cleanly. |
void |
testOverloadedInvWithMultipleMatches()
Invokes an overloaded method where the symbiosis cannot disambiguate automatically. |
void |
testOverloadedInvWithNoMatch()
Invokes an overloaded method that does not match the specified argument type |
void |
testOverloadedInvWithOneMatch()
Tests whether overloaded methods can be properly invoked if they can be resolved to one method using the actual arguments. |
void |
testStripedJavaObject()
Test whether JavaObject wrappers are correctly striped with all of the interfaces of the wrapped instance's class. |
void |
testSymbiontClassAdditions()
Tests whether new per-class methods and fields can be added to a wrapped Java class. |
void |
testSymbiontDuplicates()
Tests whether no duplicate methods or fields can be added to a wrapped Java object. |
void |
testSymbiontInstanceAdditions()
Tests whether new per-instance methods and fields can be added to a wrapped Java object. |
void |
testSymbiontParents()
Tests whether the parent pointers of the AT symbionts refer to the proper objects. |
void |
testVarArgInvocation()
Test whether variable arguments work |
void |
testWorkingClassInvocation()
Invokes the class method 'prefix' and performs a selection and assignment of the static 'ytest' field |
void |
testWorkingInstanceCreation()
Tests the invocation of new on a wrapped Java Class. |
void |
testWorkingInstanceInvocation()
Invokes the two instance methods gettertest and settertest on atTestObject. |
Methods inherited from class edu.vub.at.AmbientTalkTest |
actorTest, evalActor, evalAndCompareTo, evalAndCompareTo, evalAndReturn, evalAndTestException, evalInActor, evalSnippet, printedEquals |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.lang.Class jTestClass
private JavaClass atTestClass
private SymbiosisTest jTestObject
private JavaObject atTestObject
private JavaPackage jLobby_
public int xtest
public static java.lang.String ytest
public static final int TEST_OBJECT_INIT
Constructor Detail |
public SymbiosisTest(int xval)
public SymbiosisTest()
public SymbiosisTest(SymbiosisTest t)
public SymbiosisTest(AmbientTalkTest t)
public SymbiosisTest(JavaClass c) throws SymbiosisTest.ExceptionTest
Method Detail |
public static void main(java.lang.String[] args)
public int gettertest()
public void settertest(int xval)
public static java.lang.String prefix(java.lang.String msg)
public boolean identitytest(java.lang.Object obj)
public java.lang.String overloadedtest()
public java.lang.String overloadedtest(int x)
public java.lang.String overloadedtest(java.lang.Object[] vals)
public java.lang.String overloadedtest(double x)
public java.lang.String overloadedtest(SymbiosisTest x)
public java.lang.Object overloadedvararg(ATObject[] varargs)
public int overloadedvararg(int x)
public java.lang.String overloadedmatch2(java.lang.Object x)
public java.lang.String overloadedmatch2(SymbiosisTest x)
public void setUp()
public void testAT2JavaConversion()
public void testJava2ATConversion()
public void testWorkingInstanceInvocation()
public void testWorkingClassInvocation()
public void testFaultyArity()
public void testIllegalArgs()
public void testIllegalAssignment()
public void testVarArgInvocation()
public void testOverloadedInvWithOneMatch()
public void testOverloadedInvWithMultipleMatches()
public void testOverloadedInvWithNoMatch()
public void testNonExistentMethod()
public void testFirstClassFields()
public void testFirstClassMethods()
public void testCasting()
public void testSymbiontParents()
public void testSymbiontInstanceAdditions()
public void testSymbiontDuplicates()
public void testSymbiontClassAdditions()
public void testCloning()
public void testWorkingInstanceCreation()
public void testNonInstantiatableCreation()
public void testIllegalArgsInstanceCreation()
public void testOverloadedInstanceCreation()
public void testExceptionInInstanceCreation()
public void testCreationViaJavaObject()
public void testCustomInstanceCreation()
public void testJLobbyPackageLoading() throws InterpreterException
InterpreterException
public void testJLobbyExplicitClassLoading() throws InterpreterException
InterpreterException
public void testJLobbyNonexistentClassLoading() throws InterpreterException
InterpreterException
public void testJLobbyExplicitPackageLoading() throws InterpreterException
InterpreterException
public void testBugfixOverloadedConstructor() throws InterpreterException
InterpreterException
public void testInterfacesAndStripes() throws InterpreterException
InterpreterException
public void testStripedJavaObject() throws InterpreterException
InterpreterException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |