Changeset 32490deb for tests


Ignore:
Timestamp:
Jan 31, 2024, 6:40:25 PM (2 years ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
496ffc17
Parents:
c75b30a (diff), e71b09a (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:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
tests
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • tests/collections/.expect/string-istream-manip.txt

    rc75b30a r32490deb  
    686812 wwwwwwww
    696913 wwwwwwww
    70 14 cccc
     7014
    717115
    72721 yyyyyyyyyyyyyyyyyyyy
     
    838312 wwwwwwww
    848413 wwwwwwww
    85 14 cccc
     8514
    868615
  • tests/collections/.in/string-istream-manip.txt

    rc75b30a r32490deb  
    3636abcxxx
    3737abcyyy
    38 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww
    39 uuuuuccccuuuuu
     38aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww
     39uuuuu
    4040abc
    4141cccccb
     
    4343abcxxx
    4444abcyyy
    45 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww
    46 uuuuuccccuuuuu
     45aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww
     46uuuuu
  • tests/collections/string-istream-manip.cfa

    rc75b30a r32490deb  
    165165        sin | ignore( incl( "abc", wdi( 8, s ) ) );     sout | "12" | s;
    166166        sin | ignore( excl( "abc", wdi( 8, s ) ) );     sout | "13" | s;
     167                sin | "\n";
    167168
    168169                s = "q";
     
    191192        sin | ignore( incl( "abc", wdi( 8, s ) ) );     sout | "12" | s;
    192193        sin | ignore( excl( "abc", wdi( 8, s ) ) );     sout | "13" | s;
     194                sin | "\n";
    193195
    194196                s = "q";
  • tests/io/.expect/manipulatorsInput.arm64.txt

    rc75b30a r32490deb  
    181812 wwwwwwww
    191913 wwwwwwww
    20 14 rc=1, cccc
     2014 rc=0, q
    212115 rc=0, q
    222216 get this line
    232317 @# this line 1)-{}
    24 18 abc
    25 19 abc 
    26 20  d d
     2418 @# this line 1)-{}
     2519 abc
     2620 abc 
     2721  d d
    2728
    2829d
    29 21              ZC44%
     3022              ZC44%
     3123              ZC44%
     3224 x
     3325 x
     3426 x
     3527 x
     3628 x
    30371 yyyyyyyyyyyyyyyyyyyy
    31382 abcxxx
    32393 abcxxx
    33404 aaaaaaaa
    34 5
     415 aaaaaaaa
    35426 aabbccbb
    36437 dddwww
    37 8
    38 9
     448 dddwww
     459 dddwww
    394610 aaaaaaaa
    404711 wwwwwwww
    41 12
    42 13
    43 14 cccc
     4812 wwwwwwww
     4913 wwwwwwww
     5014
    445115
    455216 get this line
    465317 @# this line 1)-{}
    47 18 abc
    48 19 abc 
    49 20 d d
     5418 @# this line 1)-{}
     5519 abc
     5620 abc 
     5721 d d
    5058
    5159d
    52 21              ZC44%
     6022              ZC44%
     6123              ZC44%
     6224 x
     6325 x
     6426 x
     6527 x
     6628 x
    5367a
    5468a
     69xxx
     70xxx
    5571-1
    567215
  • tests/io/.expect/manipulatorsInput.x64.txt

    rc75b30a r32490deb  
    181812 wwwwwwww
    191913 wwwwwwww
    20 14 rc=1, cccc
     2014 rc=0, q
    212115 rc=0, q
    222216 get this line
    232317 @# this line 1)-{}
    24 18 abc
    25 19 abc 
    26 20  d d
     2418 @# this line 1)-{}
     2519 abc
     2620 abc 
     2721  d d
    2728
    2829d
    29 21              ZC44%
     3022              ZC44%
     3123              ZC44%
     3224 x
     3325 x
     3426 x
     3527 x
     3628 x
    30371 yyyyyyyyyyyyyyyyyyyy
    31382 abcxxx
    32393 abcxxx
    33404 aaaaaaaa
    34 5
     415 aaaaaaaa
    35426 aabbccbb
    36437 dddwww
    37 8
    38 9
     448 dddwww
     459 dddwww
    394610 aaaaaaaa
    404711 wwwwwwww
    41 12
    42 13
    43 14 cccc
     4812 wwwwwwww
     4913 wwwwwwww
     5014
    445115
    455216 get this line
    465317 @# this line 1)-{}
    47 18 abc
    48 19 abc 
    49 20 d d
     5418 @# this line 1)-{}
     5519 abc
     5620 abc 
     5721 d d
    5058
    5159d
    52 21              ZC44%
     6022              ZC44%
     6123              ZC44%
     6224 x
     6325 x
     6426 x
     6527 x
     6628 x
    5367a
    5468a
     69xxx
     70xxx
    5571-1
    567215
  • tests/io/.expect/manipulatorsInput.x86.txt

    rc75b30a r32490deb  
    181812 wwwwwwww
    191913 wwwwwwww
    20 14 rc=1, cccc
     2014 rc=0, q
    212115 rc=0, q
    222216 get this line
    232317 @# this line 1)-{}
    24 18 abc
    25 19 abc 
    26 20  d d
     2418 @# this line 1)-{}
     2519 abc
     2620 abc 
     2721  d d
    2728
    2829d
    29 21              ZC44%
     3022              ZC44%
     3123              ZC44%
     3224 x
     3325 x
     3426 x
     3527 x
     3628 x
    30371 yyyyyyyyyyyyyyyyyyyy
    31382 abcxxx
    32393 abcxxx
    33404 aaaaaaaa
    34 5
     415 aaaaaaaa
    35426 aabbccbb
    36437 dddwww
    37 8
    38 9
     448 dddwww
     459 dddwww
    394610 aaaaaaaa
    404711 wwwwwwww
    41 12
    42 13
    43 14 cccc
     4812 wwwwwwww
     4913 wwwwwwww
     5014
    445115
    455216 get this line
    465317 @# this line 1)-{}
    47 18 abc
    48 19 abc 
    49 20 d d
     5418 @# this line 1)-{}
     5519 abc
     5620 abc 
     5721 d d
    5058
    5159d
    52 21              ZC44%
     6022              ZC44%
     6123              ZC44%
     6224 x
     6325 x
     6426 x
     6527 x
     6628 x
    5367a
    5468a
     69xxx
     70xxx
    5571-1
    567215
  • tests/io/.in/manipulatorsInput.txt

    rc75b30a r32490deb  
    88abcxxx
    99abcyyy
    10 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww
    11 uuuuuccccuuuuu
     10aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww
     11uuuuu
    1212get this line
    1313@# this line 1)-{}%
     14@# this line 2)-{}%
    1415"abc"
    1516'abc  '
     
    1819d }
    1920X               ZC44%Y
     21X               ZC55%Y
     22'x'
     23"x"
     24{x}
     25XxY
     26XyY
    2027abc
    2128cccccb
     
    2330abcxxx
    2431abcyyy
    25 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww
    26 uuuuuccccuuuuu
     32aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww
     33uuuuu
    2734get this line
    2835@# this line 1)-{}%
     36@# this line 2)-{}%
    2937"abc"
    3038'abc  '
     
    3341d }
    3442X               ZC44%Y
     43X               ZC55%Y
     44'x'
     45"x"
     46{x}
     47XxY
     48XyY
    3549ab
     50xxxyyy
    36510xff 017 15-15
    37520xff 017 15-15
  • tests/io/manipulatorsInput.cfa

    rc75b30a r32490deb  
    77// Created On       : Sat Jun  8 17:58:54 2019
    88// Last Modified By : Peter A. Buhr
    9 // Last Modified On : Wed Jan  3 11:15:04 2024
    10 // Update Count     : 103
     9// Last Modified On : Sun Jan 28 11:59:55 2024
     10// Update Count     : 133
    1111//
    1212
     
    5555        }
    5656        {
    57                 char s[] = "yyyyyyyyyyyyyyyyyyyy";
     57                char s[] = "yyyyyyyyyyyyyyyyyyyy";                                                                                                      // Input characters consumed:
    5858                const char sk_fmt[] = "%*[abc]";
    59                 scanf( "abc " ); scanf( sk_fmt ); for ( 5 ) scanf( "%*c" ); printf( "1 %s\n", s );
    60                 scanf( "%s", s );                                                               printf( "2 %s\n", s );
    61                 scanf( "%*s" );                                                                 printf( "3 %s\n", s );
    62                 scanf( "%8s", s );                                                              printf( "4 %s\n", s );
    63                 scanf( "%*8s" );                                                                printf( "5 %s\n", s );
    64 
    65                 scanf( "%[abc]", s );                                                   printf( "6 %s\n", s );
    66                 scanf( "%[^abc]", s );                                                  printf( "7 %s\n", s );
    67                 scanf( "%*[abc]" );                                                             printf( "8 %s\n", s );
    68                 scanf( "%*[^abc]" );                                                    printf( "9 %s\n", s );
    69                 scanf( "%8[abc]", s );                                                  printf( "10 %s\n", s );
    70                 scanf( "%8[^abc]", s );                                                 printf( "11 %s\n", s );
    71                 scanf( "%*8[abc]" );                                                    printf( "12 %s\n", s );
    72                 scanf( "%*8[^abc]" );                                                   printf( "13 %s\n", s );
     59                scanf( "abc " ); scanf( sk_fmt ); for ( 5 ) scanf( "%*c" ); printf( "1 %s\n", s );      // |abc |\ncccccb| \nxx\n|
     60                scanf( "%s", s );                                                               printf( "2 %s\n", s );                          // |abcxxx|
     61                scanf( "%*s" );                                                                 printf( "3 %s\n", s );                          // |\nabcyyy|
     62                scanf( "%8s", s );                                                              printf( "4 %s\n", s );                          // |\naaaaaaaa|
     63                scanf( "%*8s" );                                                                printf( "5 %s\n", s );                          // |xxxxxxxx|
     64
     65                scanf( "%[abc]", s );                                                   printf( "6 %s\n", s );                          // |aabbccbb|
     66                scanf( "%[^abc]", s );                                                  printf( "7 %s\n", s );                          // |dddwww|
     67                scanf( "%*[abc]" );                                                             printf( "8 %s\n", s );                          // |bbbbbbbb|
     68                scanf( "%*[^abc]" );                                                    printf( "9 %s\n", s );                          // |wwwwwwww|
     69                scanf( "%8[abc]", s );                                                  printf( "10 %s\n", s );                         // |aaaaaaaa|
     70                scanf( "%8[^abc]", s );                                                 printf( "11 %s\n", s );                         // |wwwwwwww|
     71                scanf( "%*8[abc]" );                                                    printf( "12 %s\n", s );                         // |aaaaaaaa|
     72                scanf( "%*8[^abc]" );                                                   printf( "13 %s\n", s );                         // |wwwwwwww|
     73                scanf( "\n" );                                                                  // must start next line                         // |\n|
    7374
    7475                int rc;
    7576                s[0] = 'q'; s[1] = '\0'; rc = 99;
    76                 rc = scanf( "%[abc]", s );                                              printf( "14 rc=%d, %s\n", rc, s );
     77                rc = scanf( "%[abc]", s );                                              printf( "14 rc=%d, %s\n", rc, s );      // ||
    7778                s[0] = 'q'; s[1] = '\0'; rc = 99;
    78                 rc = scanf( "%[^u]", s );                                               printf( "15 rc=%d, %s\n", rc, s );
    79                 scanf( "%*[u]\n" );
    80                 scanf( "%[^\n]\n", s );                                                 printf( "16 %s\n", s );
    81                 scanf( "%[^%%]%%\n", s );                                               printf( "17 %s\n", s );
    82 
    83                 scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace
    84                 scanf( "\"%[^\"]\"", s );                                               printf( "18 %s\n", s );
    85                 scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace
    86                 scanf( "'%[^']'", s );                                                  printf( "19 %s\n", s );
    87                 scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace
    88                 scanf( "{%[^}]}", s );                                                  printf( "20 %s\n", s );
    89                 scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace
    90                 scanf( "X%[^Y]Y", s );                                                  printf( "21 %s\n", s );
    91                 scanf( "\n" );                                                                  // must start next line
     79                rc = scanf( "%[^u]", s );                                               printf( "15 rc=%d, %s\n", rc, s );      // ||
     80                scanf( "%*[u]\n" );                                                                                                                                     // |uuuuu\n|
     81                scanf( "%[^\n]\n", s );                                                 printf( "16 %s\n", s );                         // |get this line\n|
     82                scanf( "%[^%%]%%\n", s );                                               printf( "17 %s\n", s );                         // |@# this line 1)-{}%\n|
     83                scanf( "%*[^%%]%%\n", s );                                              printf( "18 %s\n", s );                         // |@# this line 1)-{}%\n|
     84
     85                scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace                            // ||
     86                scanf( "\"%[^\"]\"", s );                                               printf( "19 %s\n", s );                         // |"abc"|
     87                scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace                            // |\n|
     88                scanf( "'%[^']'", s );                                                  printf( "20 %s\n", s );                         // |'abc  '|
     89                scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace                            // |\n|
     90                scanf( "{%[^}]}", s );                                                  printf( "21 %s\n", s );                         // |{ d d\n\nd }|
     91                scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace                            // |\n|
     92                scanf( "X%[^Y]Y", s );                                                  printf( "22 %s\n", s );                         // |X           ZC44%Y|
     93                scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace                            // |\n|
     94                scanf( "X%*[^Y]Y", s );                                                 printf( "23 %s\n", s );                         // |X           ZC44%Y|
     95                scanf( "\n" );                                                                  // must start next line                         // |\n|
     96
     97                char ch;
     98                scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace                            // |\n|
     99                scanf( "'%c'", &ch );                                                   printf( "24 %c\n", ch );                        // |x|
     100                scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace                            // |\n|
     101                scanf( "\"%c\"", &ch );                                                 printf( "25 %c\n", ch );                        // |x|
     102                scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace                            // |\n|
     103                scanf( "{%c}", &ch );                                                   printf( "26 %c\n", ch );                        // |x|
     104                scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace                            // |\n|
     105                scanf( "X%cY", &ch );                                                   printf( "27 %c\n", ch );                        // |x|
     106                scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace                            // |\n|
     107                scanf( "X%*cY", &ch );                                                  printf( "28 %c\n", ch );                        // |x|
     108                scanf( "\n" );                                                                  // must start next line                         // |\n|
    92109        }
    93110        {
     
    108125                sin | ignore( incl( "abc", wdi( sizeof(s), 8, s ) ) ); sout | "12" | s;
    109126                sin | ignore( excl( "abc", wdi( sizeof(s), 8, s ) ) ); sout | "13" | s;
     127                sin | nl;
    110128
    111129                s[0] = 'q'; s[1] = '\0';
     
    116134                sin | getline( wdi( sizeof(s), s ) );                   sout | "16" | s;
    117135                sin | getline( wdi( sizeof(s), s ), '%' ) | "\n"; sout | "17" | s;
    118 
    119                 sin | quoted( wdi( sizeof(s), s ) );                    sout | "18" | s;
    120                 sin | quoted( wdi( sizeof(s), s ), '\'' );              sout | "19" | s;
    121                 sin | quoted( wdi( sizeof(s), s ), '{', '}' );  sout | "20" | s;
    122                 sin | quoted( wdi( sizeof(s), s ), 'X', 'Y' );  sout | "21" | s;
    123         }
    124     // Keep harmonized with collections/string-istream-manip
     136                sin | ignore( getline( wdi( sizeof(s), s ), '%' ) ) | "\n"; sout | "18" | s;
     137
     138                sin | quoted( wdi( sizeof(s), s ) );                    sout | "19" | s;
     139                sin | quoted( wdi( sizeof(s), s ), '\'' );              sout | "20" | s;
     140                sin | quoted( wdi( sizeof(s), s ), '{', '}' );  sout | "21" | s;
     141                sin | quoted( wdi( sizeof(s), s ), 'X', 'Y' );  sout | "22" | s;
     142                sin | ignore( quoted( wdi( sizeof(s), s ), 'X', 'Y' ) ); sout | "23" | s;
     143
     144                char ch;
     145                sin | quoted( ch );                                                             sout | "24 " | ch;
     146                sin | quoted( ch, '\"' );                                               sout | "25 " | ch;
     147                sin | quoted( ch, '{', '}' );                                   sout | "26 " | ch;
     148                sin | quoted( ch, 'X', 'Y' );                                   sout | "27 " | ch;
     149                sin | ignore( quoted( ch, 'X', 'Y' ) );                 sout | "28 " | ch;
     150                sin | nl;
     151        }
     152        // Keep harmonized with collections/string-istream-manip
    125153        {
    126154                char c;
    127155                sin | c;                                                                                sout | c;
    128156                sin | ignore( c );                                                              sout | c;
     157                sin | nl;
     158
     159                char ca[3] = { 'a', 'b', 'c' };
     160                sin | wdi( sizeof(ca), ca[0] );                                 sout | ca[0] | ca[1] | ca[2];
     161                sin | ignore( wdi( sizeof(ca), ca[0] ) );               sout | ca[0] | ca[1] | ca[2];
     162                sin | nl;
    129163
    130164                signed char sc;
Note: See TracChangeset for help on using the changeset viewer.