Changeset bf4fe05 for tests/enum_tests/voidEnum.cfa
- Timestamp:
- May 13, 2024, 7:07:06 AM (17 months ago)
- Branches:
- master
- Children:
- ca4f2b2
- Parents:
- ec20ab9 (diff), 5f225f5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/enum_tests/voidEnum.cfa
rec20ab9 rbf4fe05 1 1 #include <fstream.hfa> 2 2 #include <enum.hfa> 3 3 enum() voidEnum { 4 4 a, b, c … … 9 9 }; 10 10 11 // void foo (const enum voidEnum & t){} 11 char* a[voidEnum] = { 12 "A", 13 "B", 14 "C" 15 }; 12 16 13 17 int main() { 14 18 enum voidEnum v_1 = a; 15 19 enum voidEnum v_2 = b; 16 // foo(b); 17 // enum voidEnum v_3 = 10; 18 // Error as int cannot convert to void enum 20 sout | "Two different Opague Enum Should not be the same:"; 19 21 if ( v_1 == v_2 ) { 20 sout | " Equal" | nl;22 sout | "a and b are Equal" | nl; 21 23 } else { 22 sout | " Not Equal" | nl;24 sout | "a and b are Not Equal" | nl; 23 25 } 24 sout | a | nl; 25 sout | b | nl; 26 sout | "Default Output:"; 27 sout | a; 28 sout | b; 29 30 sout | labelE(v_1); 31 sout | labelE(v_2); 32 26 33 }
Note:
See TracChangeset
for help on using the changeset viewer.