Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/enum_tests/voidEnum.cfa

    r9b140bd r12df6fe  
    11#include <fstream.hfa>
    2 #include <enum.hfa>
     2
    33enum() voidEnum {
    44    a, b, c
     
    99};
    1010
    11 char* a[voidEnum] = {
    12     "A",
    13     "B",
    14     "C"
    15 };
     11// void foo (const enum voidEnum & t){}
    1612
    1713int main() {
    1814    enum voidEnum v_1 = a;
    1915    enum voidEnum v_2 = b;
    20     sout | "Two different Opague Enum Should not be the same:";
     16    // foo(b);
     17    // enum voidEnum v_3 = 10;
     18    // Error as int cannot convert to void enum
    2119    if ( v_1 == v_2 ) {
    22         sout | "a and b are Equal" | nl;
     20        sout | "Equal" | nl;
    2321    } else {
    24         sout | "a and b are Not Equal" | nl;
     22        sout | "Not Equal" | nl;
    2523    }
    26     sout | "Default Output:";
    27     sout | a;
    28     sout | b;
    29    
    30     sout | labelE(v_1);
    31     sout | labelE(v_2);
    32 
     24    sout | a | nl;
     25    sout | b | nl;
    3326}
Note: See TracChangeset for help on using the changeset viewer.