|
|||||||||||
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.AmbientTalkTestCase
edu.vub.at.objects.natives.ExceptionHandlingTest
This test documents and tests the behaviour of the exception handling primitives provided in Ambienttalk. In AmbientTalk any object can be used and thrown as an exception. Moreover, by relying on in stripes, all subtyping issues regarding to handler selection are handled by the isStripedWith meta operation.
Field Summary |
Fields inherited from class edu.vub.at.AmbientTalkTestCase |
ctx_, unittest_ |
Fields inherited from class junit.framework.TestCase |
|
Constructor Summary | |
ExceptionHandlingTest()
|
Method Summary | |
static void |
main(java.lang.String[] args)
|
void |
setUp()
|
private void |
setUpTestStripes(ATObject testScope)
|
void |
testAllObjectsCanBeUsedAsExceptions()
Any AmbientTalk Language value can be used as an exception, proving there is nothing special about exceptions. |
void |
testInterpreterExceptionHandling()
The exceptions thrown by the interpreter can be intercepted by a program as they are also striped objects, striped to identify their function. |
void |
testInterpreterExceptionThrowing()
To avoid improper interference with the interpreter, user code should never throw interpreter exceptions. |
void |
testRethrownExceptions()
When rethrowing an exception from a handler, the expected semantics apply : no handlers from the same try block are tried, even if they also match the thrown exception. |
void |
testStripeBasedHandlerSelection()
Handler selection in AmbientTalk is purely based on the stripes an object is branded with. |
Methods inherited from class edu.vub.at.AmbientTalkTestCase |
evaluateInput, 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 |
public ExceptionHandlingTest()
Method Detail |
public void testAllObjectsCanBeUsedAsExceptions()
public void testStripeBasedHandlerSelection()
public void testInterpreterExceptionHandling()
public void testInterpreterExceptionThrowing()
public void testRethrownExceptions()
public static void main(java.lang.String[] args)
private void setUpTestStripes(ATObject testScope) throws java.lang.Exception
java.lang.Exception
public void setUp() throws java.lang.Exception
setUp
in class AmbientTalkTestCase
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |