edu.vub.at.objects.mirrors
Class InvocationTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byedu.vub.at.AmbientTalkTestCase
              extended byedu.vub.at.objects.mirrors.ReflectiveAccessTest
                  extended byedu.vub.at.objects.mirrors.InvocationTest
All Implemented Interfaces:
junit.framework.Test

public class InvocationTest
extends ReflectiveAccessTest

Author:
smostinc InvocationTest tests the various reflective machinery provided in the mirrors package such as to see whether they work accurately. Three ATTypes are used in the course of this tests, namely ATBoolean (which provides easy cases to test), ATTable (which is used amongst others to test field access), and ATMessage (which has fields that can be set at the base level).

Field Summary
 
Fields inherited from class edu.vub.at.objects.mirrors.ReflectiveAccessTest
closures, echo_, fail, False, lexicalRoot, success, symbol, True
 
Fields inherited from class edu.vub.at.AmbientTalkTestCase
ctx_, unittest_
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
InvocationTest()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 void testBaseFieldAccess()
          Tests the accessing of fields on a natively implemented table.
 void testBaseFieldAssignment()
          Tests the accessing of fields on a natively implemented table.
 void testBaseInvocation()
          This test initialises a lexical root with the values success, fail, true and false.
 void testJavaBaseFieldAccess()
          Tests the accessing of fields on a natively implemented table.
 void testJavaBaseFieldAssignment()
          Tests the assignment of fields on a natively implemented message send parse tree element.
 void testJavaBaseMethodInvocation()
          Tests the invocation of methods on natively implemented objects which thus adhere to the expected interfaces.
 void testSimulatedBaseFieldAccess()
          Tests the accessing of fields on a natively implemented table.
 void testSimulatedBaseFieldAssignment()
          Tests the assignment of fields on a natively implemented message send parse tree element.
 void testSimulatedBaseInvocation()
          Simulates invocation from the base-level by manually calling meta_invoke.
 
Methods inherited from class edu.vub.at.objects.mirrors.ReflectiveAccessTest
evaluateInput, setUp
 
Methods inherited from class edu.vub.at.AmbientTalkTestCase
tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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

InvocationTest

public InvocationTest()
Method Detail

main

public static void main(java.lang.String[] args)

testJavaBaseMethodInvocation

public void testJavaBaseMethodInvocation()
Tests the invocation of methods on natively implemented objects which thus adhere to the expected interfaces. This test checks the semantics of the classes under test such that faults can be traced back to either the NAT-objects or the reflective infrastructure.


testSimulatedBaseInvocation

public void testSimulatedBaseInvocation()
Simulates invocation from the base-level by manually calling meta_invoke. This test determines in case of failures whether they are due to a fault in the meta_invoke implementation of NATNil or in the semantics of method invocation as a result of meta_eval on an AG-component.


testBaseInvocation

public void testBaseInvocation()
This test initialises a lexical root with the values success, fail, true and false. Then it invokes methods from base-level ambienttalk. This test concludes the first installment of test which test the plain invocation of base-level methods on native types in AmbientTalk.


testJavaBaseFieldAccess

public void testJavaBaseFieldAccess()
Tests the accessing of fields on a natively implemented table. This test calls the methods from java and thus will fail only when the corresponding implementation is corrupted.


testSimulatedBaseFieldAccess

public void testSimulatedBaseFieldAccess()
Tests the accessing of fields on a natively implemented table. If this test succeeds and the next test fails, the fault is due to the implementation of the AG-objects for tabulation and or application.


testBaseFieldAccess

public void testBaseFieldAccess()
Tests the accessing of fields on a natively implemented table. This test uses ambienttalk code for the evaluation, so


testJavaBaseFieldAssignment

public void testJavaBaseFieldAssignment()
Tests the assignment of fields on a natively implemented message send parse tree element. This test calls the methods from java and thus will fail only when the corresponding implementation is corrupted.


testSimulatedBaseFieldAssignment

public void testSimulatedBaseFieldAssignment()
Tests the assignment of fields on a natively implemented message send parse tree element. If this test succeeds and the next test fails, the fault is due to the implementation of the AG-objects for assignment, quotation and or method invocation.


testBaseFieldAssignment

public void testBaseFieldAssignment()
Tests the accessing of fields on a natively implemented table. This test uses ambienttalk code for the evaluation, so