Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/ifwhileCtl.cfa

    rdc8511c r200fcb3  
    1010// Created On       : Sat Aug 26 10:13:11 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Nov  6 17:57:07 2018
    13 // Update Count     : 22
     12// Last Modified On : Tue Dec  4 21:39:18 2018
     13// Update Count     : 23
    1414//
    1515
     
    2222
    2323        if ( int x = 1 ) {
    24                 sout | "x != 0 correct" | endl;
     24                sout | "x != 0 correct";
    2525        } else {
    26                 sout | "x == 0 incorrect" | endl;
     26                sout | "x == 0 incorrect";
    2727        } // if
    2828
    2929        if ( int x = 4, y = 0 ) {
    30                 sout | "x != 0 && y != 0 incorrect" | endl;
     30                sout | "x != 0 && y != 0 incorrect";
    3131        } else if ( int x = 4, y = 1 ) {
    32                 sout | "x != 0 && y != 0 correct" | endl;
     32                sout | "x != 0 && y != 0 correct";
    3333        } else {
    34                 sout | "x == 0 || y == 0 incorrect" | endl;
     34                sout | "x == 0 || y == 0 incorrect";
    3535        } // if
    3636
    3737        if ( int x = 5, y = f( x ); x == y ) {
    38                 sout | "x == y correct" | endl;
     38                sout | "x == y correct";
    3939        } else {
    40                 sout | "x != y incorrect" | endl;
     40                sout | "x != y incorrect";
    4141        } // if
    4242
    4343        if ( struct S { int i; } s = { 3 }; s.i < 4 ) {
    4444                S s1;
    45                 sout | "s.i < 4 correct" | endl;
     45                sout | "s.i < 4 correct";
    4646        } else {
    4747                S s1;
    48                 sout | "s.i >= 4 incorrect" | endl;
     48                sout | "s.i >= 4 incorrect";
    4949        } // if
    5050
    5151        while ( int x = 1 ) {
    52                 sout | "x != 0 correct" | endl;
     52                sout | "x != 0 correct";
    5353                break;
    5454        } // while
    5555
    5656        while ( int x = 4, y = 0 ) {
    57                 sout | "x != 0 && y != 0 incorrect" | endl;
     57                sout | "x != 0 && y != 0 incorrect";
    5858        } // while
    5959
    6060        while ( int x = 5, y = f( x ); x == y ) {
    61                 sout | "x == y correct" | endl;
     61                sout | "x == y correct";
    6262                break;
    6363        } // while
     
    6565        while ( struct S { int i; } s = { 3 }; s.i < 4 ) {
    6666                S s1;
    67                 sout | "s.i < 4 correct" | endl;
     67                sout | "s.i < 4 correct";
    6868                break;
    6969        } // while
Note: See TracChangeset for help on using the changeset viewer.