|
|||||||||||
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.natives.NATObjectClosureTest
AmbientTalk/2 is a dually scoped programming language, providing access to both the lexical scope methods and objects are defined in, as well as a dynamic scope which follows the parent chain of an object. Moreover, the language features the notion of closures and methods which have important semantic differences, and a few additional concepts. This test suite documents the proper binding semantics for variables, self and super inside methods and closures.
Nested Class Summary | |
private class |
NATObjectClosureTest.AGScopeTest
This class is a special statement class used to test the correct scoping of method invocation from the java level, rather than by executing ambienttalk code directly. |
Nested classes inherited from class edu.vub.at.AmbientTalkTest |
AmbientTalkTest.Actorscript |
Field Summary |
Fields inherited from class edu.vub.at.AmbientTalkTest |
ctx_ |
Fields inherited from class junit.framework.TestCase |
|
Constructor Summary | |
NATObjectClosureTest()
|
Method Summary | |
static void |
main(java.lang.String[] args)
|
void |
testDelegatedMethodInvocation()
NATIVE TEST: Tests the validity of the various scope pointers in a context object when applying a method in a simple hierarchy of objects |
void |
testDelegatedMethodScope()
AmbientTalk introduces first class delegation using the ^ symbol. |
void |
testExtend()
NATIVE TEST: Makes a simple extension of an orphan object using a closure. |
void |
testExternalDefinitionOnIsolates()
Since external definitions inherently are equipped access to their lexical scope, and isolates are prohibited access to any form of lexical scope so that they can be copied between actors, these mechanisms are irreconcilable. |
void |
testExternalMethodBindings()
NATIVE TEST: Tests whether the definition of an external method refers to the correct bindings for: - lexically accessed variables - the value of 'self' - the value of 'super' |
void |
testExternalMethodScope()
Methods can be added to an object using external method definitions. |
void |
testInvokeLexicallyVisibleMethod()
When objects are lexically nested, the nested object has lexical access to the methods of the enclosing object. |
void |
testIsolateScope()
Isolates are objects which have no access to variables in their lexical scope (hence their name). |
void |
testLexicallyInvokeInheritedMethod()
The previous test illustrated that it is possible to perform a lexical invocation of methods in an enclosing object. |
void |
testMethodInvocation()
NATIVE TEST: Tests the validity of the various scope pointers in a context object when applying a method defined in and invoked upon an orphan object |
void |
testNestedClosureScope()
Closures are created when defining a function inside an object's method as well. |
void |
testOrphanObjectScope()
When defining an object, the programmer can choose to create either a method or a closure. |
void |
testParentObjectScope()
When defining an object, the programmer can choose to create either a method or a closure. |
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, setUp, 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 |
Constructor Detail |
public NATObjectClosureTest()
Method Detail |
public static void main(java.lang.String[] args)
public void testOrphanObjectScope()
public void testParentObjectScope()
public void testNestedClosureScope()
public void testInvokeLexicallyVisibleMethod()
public void testLexicallyInvokeInheritedMethod()
public void testDelegatedMethodScope()
public void testExternalMethodScope()
public void testIsolateScope()
public void testExternalDefinitionOnIsolates()
public void testMethodInvocation()
public void testDelegatedMethodInvocation()
public void testExtend()
public void testExternalMethodBindings() throws InterpreterException
InterpreterException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |