edu.vub.at.objects.natives
Class LexicalRootTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byedu.vub.at.AmbientTalkTest
              extended byedu.vub.at.objects.natives.LexicalRootTest
All Implemented Interfaces:
junit.framework.Test

public class LexicalRootTest
extends AmbientTalkTest

Author:
tvcutsem The unit test LexicalRootTest tests globally visible methods in the lexical root. TODO: finish me

Nested Class Summary
 
Nested classes inherited from class edu.vub.at.AmbientTalkTest
AmbientTalkTest.Actorscript
 
Field Summary
static AGSymbol atM_
           
static AGSymbol atN_
           
static AGSymbol atX_
           
private  NATObject trait_
           
 
Fields inherited from class edu.vub.at.AmbientTalkTest
ctx_
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
LexicalRootTest()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 void setUp()
          Initialize the trait used for testing import: def parent := object: { def n() { nil }; def m() { nil } } def trait := extend: parent with: { def x := 0; def m() { self } }
 void testBasicImport()
          Tests whether a basic import of fields and methods from a 'trait' object into a 'host' object works properly.
 void testConflictingImport()
          Tests whether conflicts are successfully detected.
 void testImportAndAliasing()
          Tests whether aliasing works properly.
 void testImportAndAliasingAndExclusion()
          Tests whether aliasing and exclusion work properly together.
 void testImportAndExclusion()
          Tests whether exclusion works properly.
 void testLexicalRootFields()
           
 void testTransitiveImport()
          Tests whether traits can be transitively imported into objects.
 
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

trait_

private NATObject trait_

atX_

public static final AGSymbol atX_

atM_

public static final AGSymbol atM_

atN_

public static final AGSymbol atN_
Constructor Detail

LexicalRootTest

public LexicalRootTest()
Method Detail

main

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

testLexicalRootFields

public void testLexicalRootFields()

setUp

public void setUp()
           throws java.lang.Exception
Initialize the trait used for testing import: def parent := object: { def n() { nil }; def m() { nil } } def trait := extend: parent with: { def x := 0; def m() { self } }

Throws:
java.lang.Exception

testBasicImport

public void testBasicImport()
                     throws InterpreterException
Tests whether a basic import of fields and methods from a 'trait' object into a 'host' object works properly.

Throws:
InterpreterException

testConflictingImport

public void testConflictingImport()
                           throws InterpreterException
Tests whether conflicts are successfully detected.

Throws:
InterpreterException

testTransitiveImport

public void testTransitiveImport()
                          throws InterpreterException
Tests whether traits can be transitively imported into objects.

Throws:
InterpreterException

testImportAndAliasing

public void testImportAndAliasing()
                           throws InterpreterException
Tests whether aliasing works properly.

Throws:
InterpreterException

testImportAndExclusion

public void testImportAndExclusion()
                            throws InterpreterException
Tests whether exclusion works properly.

Throws:
InterpreterException

testImportAndAliasingAndExclusion

public void testImportAndAliasingAndExclusion()
                                       throws InterpreterException
Tests whether aliasing and exclusion work properly together.

Throws:
InterpreterException