Object Test Syntax

References
Purpose:

To test that the syntax for the Object Test mechanism works as expected

Test procedure:

1 - With compiled application, enter the following object test in the 'make' procedure

if {x: !APPLICATION} Current then print ("True%N") end

System should compile with no errors, repeat with the ! mark removed, system should raise an error complaining that APPLICATION type is not attached.

2 - Now change the default options of 'Are types attached by default' to True then recompile from scratch the following code

if {x: APPLICATION} Current then print ("True%N") end

System should compile with no errors

3 - Now change the test to as follows (with 'Are types attached by default' still set to True.

if {x: like Current} Current then print ("True%N") end

System should compile with no errors

4 - Now change the test to be a qualified call as follows

if {x: like Current} Current.out then print ("We conform to ourselves%N") end

System should compile with no errors

5 - Now test for parsing errors by removing parts of the object test, error should be reported on the appropriate line. Change the test from an expression to a statement, check that the error is reported.

6 - Check the test using an unattached type marker ?

if {x: APPLICATION} Current then print ("We conform to ourselves%N") end

An error should be reported stating the the type is unattached.

7 - Test that the scope of the variable does not interfere with any enclosing routines in adherence to ECMA scope definitions for object test locals.

Initial Conditions:

Basic Application Compiled

Expected result:

As mentioned after each test procedure

Test runs

No test runs for this test case available.