Changeset eae8b37 for tests/enum_tests
- Timestamp:
- Dec 4, 2024, 10:17:49 PM (10 months ago)
- Branches:
- master
- Children:
- fc276f3
- Parents:
- 509ec82
- Location:
- tests/enum_tests
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/enum_tests/.expect/position.txt
r509ec82 reae8b37 1 Compile Time: blue value: blue, position: 2, label: Blue, default return value: blue2 Runtime : fishy value: green, position: 1, label: Green, default return value: green3 Runtime : C2 value: green, position: 1, label: Green, default return value: green1 Enumeration Constant<Blue>:: value: blue, position: 2, label: Blue, default output: Blue 2 Runtime Value<fishy>:: value: green, position: 1, label: Green, default output: Green 3 Runtime Value<C2>:: value: green, position: 1, label: Green, default output: Green 4 4 ao is red 5 5 ko is green -
tests/enum_tests/anonymous.cfa
r509ec82 reae8b37 3 3 4 4 int main() { 5 sout | nthreads;5 sout | value(nthreads); 6 6 } 7 7 -
tests/enum_tests/enumInlineValue.cfa
r509ec82 reae8b37 1 1 #include <fstream.hfa> 2 #include <enum.hfa>3 2 4 3 enum(int) A !{ -
tests/enum_tests/input.cfa
r509ec82 reae8b37 1 1 #include <fstream.hfa> 2 #include <enum.hfa>3 2 4 3 int main() { -
tests/enum_tests/planet.cfa
r509ec82 reae8b37 1 1 #include <fstream.hfa> 2 2 #include <stdlib.hfa> 3 #include <enum.hfa>4 3 5 4 struct MR { double mass, radius; }; -
tests/enum_tests/position.cfa
r509ec82 reae8b37 17 17 Colour c2 = fishy; 18 18 19 sout | " Compile Time: blue value: " | value(Colour.Blue) | ", position: " | posn(Colour.Blue) | ", label: " | label(Colour.Blue) | ", default return value: " | Colour.Blue;20 sout | "Runtime : fishy value: " | value(fishy) | ", position: " | posn(fishy) | ", label: " | label(fishy) | ", default return value: " | fishy;21 sout | "Runtime : C2 value: " | value(c2) | ", position: " | posn(c2) | ", label: " | label(c2) | ", default return value: " | c2;19 sout | "Enumeration Constant<Blue>:: value: " | value(Colour.Blue) | ", position: " | posn(Colour.Blue) | ", label: " | label(Colour.Blue) | ", default output: " | Colour.Blue; 20 sout | "Runtime Value<fishy>:: value: " | value(fishy) | ", position: " | posn(fishy) | ", label: " | label(fishy) | ", default output: " | fishy; 21 sout | "Runtime Value<C2>:: value: " | value(c2) | ", position: " | posn(c2) | ", label: " | label(c2) | ", default output: " | c2; 22 22 Colour.Red; 23 23 char * ao = Colour.Red; -
tests/enum_tests/typedIntEnum.cfa
r509ec82 reae8b37 12 12 13 13 int main() { 14 sout | "0=" | zero;15 sout | "1=" | one;16 sout | "1000=" | thousand;17 sout | "1001=" | thousand_one;18 sout | "2000=" | two_thousand;19 sout | "2001=" | two_thousand_one;20 sout | "2002=" | two_thousand_two;14 sout | "0=" | value(zero); 15 sout | "1=" | value(one); 16 sout | "1000=" | value(thousand); 17 sout | "1001=" | value(thousand_one); 18 sout | "2000=" | value(two_thousand); 19 sout | "2001=" | value(two_thousand_one); 20 sout | "2002=" | value(two_thousand_two); 21 21 return 0; 22 22 } -
tests/enum_tests/voidEnum.cfa
r509ec82 reae8b37 1 1 #include <fstream.hfa> 2 #include <enum.hfa>3 2 4 3 enum() E { A, B, C };
Note:
See TracChangeset
for help on using the changeset viewer.