interscript/tests/test_beginend

interscript/tests/test_beginend

1. Begin/End test

We test the @begin and @end commands with a simple scoping test. First, a level is set to 1, and we create a class with a destructor and an object thereof. Level is 1.

Now, a new block. Check old value of level. Level is 1. Now set level to 2, and create another class object. Level is 2.

Finally we end the block here. This should kill the inner class object. X object of level 2 destroyed.

Back in the old block we test the level. Level is 1. That's the simple test. Now, the outer class object should die. X object of level 1 destroyed.