--| 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 function-attribute-constant test_description A system creates an instance of a class and prints the value of its only feature, which is a function returning INTEGER. After initial compilation where the system is frozen, the constant is changed to an INTEGER attribute and changes are melted. System execution still produces the correct result. Then the feature is changed to an INTEGER constant and changes are melted. System execution then produces the wrong result (the value returned by the original function). define FEATURE "value: INTEGER is do Result := 47 end" copy_sub Ace $TEST Ace copy_sub test.e $CLUSTER test.e compile_frozen compile_result ok c_compile_work c_compile_result ok execute_work NONE exec_output1 execute_result ok compare exec_output1 output1 define FEATURE "value: INTEGER" copy_sub test.e $CLUSTER test.e compile_melted compile_result ok execute_work NONE exec_output2 execute_result ok compare exec_output2 output2 define FEATURE "value: INTEGER is 13" copy_sub test.e $CLUSTER test.e compile_melted compile_result ok execute_work NONE exec_output3 execute_result ok compare exec_output3 output3 compile_frozen compile_result ok c_compile_work c_compile_result ok execute_work NONE exec_output4 execute_result ok compare exec_output4 output3 test_end