Ignore:
Timestamp:
May 13, 2024, 7:07:06 AM (17 months ago)
Author:
Peter A. Buhr <pabuhr@…>
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.
Message:

fix merge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/enum_tests/voidEnum.cfa

    rec20ab9 rbf4fe05  
    11#include <fstream.hfa>
    2 
     2#include <enum.hfa>
    33enum() voidEnum {
    44    a, b, c
     
    99};
    1010
    11 // void foo (const enum voidEnum & t){}
     11char* a[voidEnum] = {
     12    "A",
     13    "B",
     14    "C"
     15};
    1216
    1317int main() {
    1418    enum voidEnum v_1 = a;
    1519    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:";
    1921    if ( v_1 == v_2 ) {
    20         sout | "Equal" | nl;
     22        sout | "a and b are Equal" | nl;
    2123    } else {
    22         sout | "Not Equal" | nl;
     24        sout | "a and b are Not Equal" | nl;
    2325    }
    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
    2633}
Note: See TracChangeset for help on using the changeset viewer.