Changeset 200fcb3 for tests/swap.cfa


Ignore:
Timestamp:
Dec 12, 2018, 9:16:12 AM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer
Children:
5ebb1368
Parents:
3d99498
Message:

add auto newline to sout, change endl to nl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/swap.cfa

    r3d99498 r200fcb3  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Nov  6 18:01:23 2018
    13 // Update Count     : 72
     12// Last Modified On : Tue Dec 11 10:17:40 2018
     13// Update Count     : 74
    1414//
    1515
     
    1919int main( void ) {
    2020        char c1 = 'a', c2 = 'b';
    21         sout | "char\t\t\t" | c1 | ' ' | c2 | "\t\t\tswap ";
     21        sout | "char\t\t\t" | c1 | ' ' | c2 | "\t\t\tswap " | nonl;
    2222        swap( c1, c2 );
    23         sout | '\t' | c1 | ' ' | c2 | endl;
     23        sout | '\t' | c1 | ' ' | c2;
    2424
    2525        signed int i1 = -1, i2 = -2;
    26         sout | "signed int\t\t" | i1 | i2 | "\t\t\tswap ";
     26        sout | "signed int\t\t" | i1 | i2 | "\t\t\tswap " | nonl;
    2727        swap( i1, i2 );
    28         sout | '\t' | i1 | i2 | endl;
     28        sout | '\t' | i1 | i2;
    2929
    3030        unsigned int ui1 = 1, ui2 = 2;
    31         sout | "unsigned int\t\t" | ui1 | ui2 | "\t\t\tswap ";
     31        sout | "unsigned int\t\t" | ui1 | ui2 | "\t\t\tswap " | nonl;
    3232        swap( ui1, ui2 );
    33         sout | '\t' | ui1 | ui2 | endl;
     33        sout | '\t' | ui1 | ui2;
    3434
    3535        signed long int li1 = -1, li2 = -2;
    36         sout | "signed long int\t\t" | li1 | li2 | "\t\t\tswap ";
     36        sout | "signed long int\t\t" | li1 | li2 | "\t\t\tswap " | nonl;
    3737        swap( li1, li2 );
    38         sout | '\t' | li1 | li2 | endl;
     38        sout | '\t' | li1 | li2;
    3939
    4040        unsigned long int uli1 = 1, uli2 = 2;
    41         sout | "unsigned long int\t" | uli1 | uli2 | "\t\t\tswap ";
     41        sout | "unsigned long int\t" | uli1 | uli2 | "\t\t\tswap " | nonl;
    4242        swap( uli1, uli2 );
    43         sout | '\t' | uli1 | uli2 | endl;
     43        sout | '\t' | uli1 | uli2;
    4444
    4545        signed long long int lli1 = -1, lli2 = -2;
    46         sout | "signed long long int\t" | lli1 | lli2 | "\t\t\tswap ";
     46        sout | "signed long long int\t" | lli1 | lli2 | "\t\t\tswap " | nonl;
    4747        swap( lli1, lli2 );
    48         sout | '\t' | lli1 | lli2 | endl;
     48        sout | '\t' | lli1 | lli2;
    4949
    5050        unsigned long long int ulli1 = 1, ulli2 = 2;
    51         sout | "unsigned long long int\t" | ulli1 | ulli2 | "\t\t\tswap ";
     51        sout | "unsigned long long int\t" | ulli1 | ulli2 | "\t\t\tswap " | nonl;
    5252        swap( ulli1, ulli2 );
    53         sout | '\t' | ulli1 | ulli2 | endl;
     53        sout | '\t' | ulli1 | ulli2;
    5454
    5555        float f1 = 1.5, f2 = 2.5;
    56         sout | "float\t\t\t" | f1 | f2 | "\t\t\tswap ";
     56        sout | "float\t\t\t" | f1 | f2 | "\t\t\tswap " | nonl;
    5757        swap( f1, f2 );
    58         sout | '\t' | f1 | f2 | endl;
     58        sout | '\t' | f1 | f2;
    5959
    6060        double d1 = 1.5, d2 = 2.5;
    61         sout | "double\t\t\t" | d1 | d2 | "\t\t\tswap ";
     61        sout | "double\t\t\t" | d1 | d2 | "\t\t\tswap " | nonl;
    6262        swap( d1, d2 );
    63         sout | '\t' | d1 | d2 | endl;
     63        sout | '\t' | d1 | d2;
    6464
    6565        long double ld1 = 1.5, ld2 = 2.5;
    66         sout | "long double\t\t" | ld1 | ld2 | "\t\t\tswap ";
     66        sout | "long double\t\t" | ld1 | ld2 | "\t\t\tswap " | nonl;
    6767        swap( ld1, ld2 );
    68         sout | '\t' | ld1 | ld2 | endl;
     68        sout | '\t' | ld1 | ld2;
    6969
    7070        float _Complex fc1 = 1.5f+1.5if, fc2 = 2.5f+2.5if;
    71         sout | "float _Complex\t\t" | fc1 | fc2 | "\tswap ";
     71        sout | "float _Complex\t\t" | fc1 | fc2 | "\tswap " | nonl;
    7272        swap( fc1, fc2 );
    73         sout | '\t' | fc1 | fc2 | endl;
     73        sout | '\t' | fc1 | fc2;
    7474
    7575        double _Complex dc1 = 1.5d+1.5id, dc2 = 2.5d+2.5id;
    76         sout | "double _Complex\t\t" | dc1 | dc2 | "\tswap ";
     76        sout | "double _Complex\t\t" | dc1 | dc2 | "\tswap " | nonl;
    7777        swap( dc1, dc2 );
    78         sout | '\t' | dc1 | dc2 | endl;
     78        sout | '\t' | dc1 | dc2;
    7979
    8080        long double _Complex ldc1 = 1.5d+1.5il, ldc2 = 2.5d+2.5il;
    81         sout | "long double _Complex\t" | ldc1 | ldc2 | "\tswap ";
     81        sout | "long double _Complex\t" | ldc1 | ldc2 | "\tswap " | nonl;
    8282        swap( ldc1, ldc2 );
    83         sout | '\t' | ldc1 | ldc2 | endl;
     83        sout | '\t' | ldc1 | ldc2;
    8484
    8585        struct S { int i, j; } s1 = { 1, 2 }, s2 = { 2, 1 };
    8686        ofstream & ?|?( ofstream & os, S s ) { return os | s.i | s.j; }
    87         sout | "struct S\t\t" | s1 | "," | s2 | "\t\tswap ";
     87        sout | "struct S\t\t" | s1 | "," | s2 | "\t\tswap " | nonl;
    8888        swap( s1, s2 );
    89         sout | '\t' | s1 | "," | s2 | endl;
     89        sout | '\t' | s1 | "," | s2;
    9090} // main
    9191
Note: See TracChangeset for help on using the changeset viewer.