--| Copyright (c) 1993-2006 University of Southern California and contributors. --| All rights reserved. --| Your use of this work is governed under the terms of the GNU General --| Public License version 2. -- This is a test control file test_name validity-vaol1-basic test_description Violate validity constraint VAOL1 with an `old' expression which is not in a postcondition copy_sub Ace $TEST Ace define REST "try is require old value = 47 do end" copy_sub test.e $CLUSTER test.e compile_melted compile_result validity_error TEST VAOL(1) define REST "try is do if old value = 47 then end end" copy_sub test.e $CLUSTER test.e resume_compile compile_result validity_error TEST VAOL(1) define REST "try is local x: INTEGER do x := old value end" copy_sub test.e $CLUSTER test.e resume_compile compile_result validity_error TEST VAOL(1) define REST "try is do check old value = 47 end end" copy_sub test.e $CLUSTER test.e resume_compile compile_result validity_error TEST VAOL(1) define REST "try is do from invariant old value = value until false loop end end" copy_sub test.e $CLUSTER test.e resume_compile compile_result validity_error TEST VAOL(1) define REST "try is do from variant old value until false loop end end" copy_sub test.e $CLUSTER test.e resume_compile compile_result validity_error TEST VAOL(1) define REST "try is do rescue if old b = b then end; retry end" copy_sub test.e $CLUSTER test.e resume_compile compile_result validity_error TEST VAOL(1) define REST "try is do end invariant old b; old value = 47" copy_sub test.e $CLUSTER test.e resume_compile compile_result validity_error TEST VAOL(1) VAOL(1) define REST "try is do ensure old value = value; old b end" copy_sub test.e $CLUSTER test.e resume_compile compile_result ok test_end