- Timestamp:
- Aug 9, 2023, 5:40:57 PM (18 months ago)
- Branches:
- master
- Children:
- 9ff71ff
- Parents:
- e7a8f65
- Location:
- tests/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/io/io.cfa
re7a8f65 r74c6748 10 10 // Created On : Wed Mar 2 16:56:02 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Jun 29 10:19:31202313 // Update Count : 12 612 // Last Modified On : Tue Aug 8 23:18:32 2023 13 // Update Count : 128 14 14 // 15 15 … … 104 104 in | f | d | ld; // floating point 105 105 in | fc | dc | ldc; // floating-point complex 106 in | s1 | wdi( size, s2 );// C string, length unchecked and checked106 in | wdi(size, s1) | wdi( size, s2 ); // C string, length unchecked and checked 107 107 sout | nl; 108 108 -
tests/io/manipulatorsInput.cfa
re7a8f65 r74c6748 7 7 // Created On : Sat Jun 8 17:58:54 2019 8 8 // Last Modified By : Peter A. Buhr 9 // Last Modified On : Sat Jun 17 07:56:02202310 // Update Count : 489 // Last Modified On : Wed Aug 9 17:23:21 2023 10 // Update Count : 59 11 11 // 12 12 … … 19 19 const char sk[] = "abc"; 20 20 scanf( "abc " ); scanf( sk ); for ( 5 ) scanf( "%*c" ); printf( "1 %s\n", s ); 21 scanf( "%s", s ); printf( "2 %s\n", s );22 scanf( "%*s" ); printf( "3 %s\n", s );23 scanf( "%8s", s ); printf( "4 %s\n", s );24 scanf( "%*8s" ); printf( "5 %s\n", s );21 scanf( "%s", s ); printf( "2 %s\n", s ); 22 scanf( "%*s" ); printf( "3 %s\n", s ); 23 scanf( "%8s", s ); printf( "4 %s\n", s ); 24 scanf( "%*8s" ); printf( "5 %s\n", s ); 25 25 26 scanf( "%[abc]", s ); printf( "6 %s\n", s );27 scanf( "%[^abc]", s ); printf( "7 %s\n", s );28 scanf( "%*[abc]" ); printf( "8 %s\n", s );29 scanf( "%*[^abc]" ); printf( "9 %s\n", s );30 scanf( "%8[abc]", s ); printf( "10 %s\n", s );31 scanf( "%8[^abc]", s ); printf( "11 %s\n", s );32 scanf( "%*8[abc]" ); printf( "12 %s\n", s );33 scanf( "%*8[^abc]" ); printf( "13 %s\n", s );26 scanf( "%[abc]", s ); printf( "6 %s\n", s ); 27 scanf( "%[^abc]", s ); printf( "7 %s\n", s ); 28 scanf( "%*[abc]" ); printf( "8 %s\n", s ); 29 scanf( "%*[^abc]" ); printf( "9 %s\n", s ); 30 scanf( "%8[abc]", s ); printf( "10 %s\n", s ); 31 scanf( "%8[^abc]", s ); printf( "11 %s\n", s ); 32 scanf( "%*8[abc]" ); printf( "12 %s\n", s ); 33 scanf( "%*8[^abc]" ); printf( "13 %s\n", s ); 34 34 } 35 35 { … … 37 37 char sk[] = "abc"; 38 38 sin /*| "abc "*/ | skip( sk ) | skip( 5 ); sout | "1" | s; 39 sin | s;sout | "2" | s;40 sin | ignore( s ); sout | "3" | s;41 sin | wdi( 8, s ); sout | "4" | s;42 sin | ignore( wdi( 8, s ) ); sout | "5" | s;39 sin | wdi( sizeof(s), s ); sout | "2" | s; 40 sin | ignore( s ); sout | "3" | s; 41 sin | wdi( 8, s ); sout | "4" | s; 42 sin | ignore( wdi( 8, s ) ); sout | "5" | s; 43 43 44 sin | incl( "abc", s );sout | "6" | s;45 sin | excl( "abc", s );sout | "7" | s;46 sin | ignore( incl( "abc", s ) );sout | "8" | s;47 sin | ignore( excl( "abc", s ) );sout | "9" | s;48 sin | wdi( 8, incl( "abc", s ) );sout | "10" | s;49 sin | wdi( 8, excl( "abc", s ) );sout | "11" | s;50 sin | ignore( wdi( 8, incl( "abc", s ) ) ); sout | "12" | s;51 sin | ignore( wdi( 8, excl( "abc", s ) ) ); sout | "13" | s;44 sin | incl( "abc", wdi( sizeof(s), s ) ); sout | "6" | s; 45 sin | excl( "abc", wdi( sizeof(s), s ) ); sout | "7" | s; 46 sin | ignore( incl( "abc", wdi( sizeof(s), s ) ) ); sout | "8" | s; 47 sin | ignore( excl( "abc", wdi( sizeof(s), s ) ) ); sout | "9" | s; 48 sin | incl( "abc", wdi( 8, s ) ); sout | "10" | s; 49 sin | excl( "abc", wdi( 8, s ) ); sout | "11" | s; 50 sin | ignore( incl( "abc", wdi( 8, s ) ) ); sout | "12" | s; 51 sin | ignore( excl( "abc", wdi( 8, s ) ) ); sout | "13" | s; 52 52 } 53 53 { 54 54 char c; 55 sin | c; sout | c;56 sin | ignore( c ); sout | c;55 sin | c; sout | c; 56 sin | ignore( c ); sout | c; 57 57 58 58 signed char sc; 59 sin | sc; sout | sc;60 sin | wdi( 3, sc ); sout | sc;61 sin | ignore( sc ); sout | sc;62 sin | ignore( wdi( 3, sc ) ); sout | sc;59 sin | sc; sout | sc; 60 sin | wdi( 3, sc ); sout | sc; 61 sin | ignore( sc ); sout | sc; 62 sin | ignore( wdi( 3, sc ) ); sout | sc; 63 63 64 64 unsigned char usc; 65 sin | usc; sout | usc;66 sin | wdi( 3, usc ); sout | usc;67 sin | ignore( usc ); sout | usc;68 sin | ignore( wdi( 3, usc ) ); sout | usc;65 sin | usc; sout | usc; 66 sin | wdi( 3, usc ); sout | usc; 67 sin | ignore( usc ); sout | usc; 68 sin | ignore( wdi( 3, usc ) ); sout | usc; 69 69 70 70 signed short int ssi; 71 sin | ssi; sout | ssi;72 sin | wdi( 3, ssi ); sout | ssi;73 sin | ignore( ssi ); sout | ssi;74 sin | ignore( wdi( 3, ssi ) ); sout | ssi;71 sin | ssi; sout | ssi; 72 sin | wdi( 3, ssi ); sout | ssi; 73 sin | ignore( ssi ); sout | ssi; 74 sin | ignore( wdi( 3, ssi ) ); sout | ssi; 75 75 76 76 unsigned short int usi; 77 sin | usi; sout | usi;78 sin | wdi( 3, usi ); sout | usi;79 sin | ignore( usi ); sout | usi;80 sin | ignore( wdi( 3, usi ) ); sout | usi;77 sin | usi; sout | usi; 78 sin | wdi( 3, usi ); sout | usi; 79 sin | ignore( usi ); sout | usi; 80 sin | ignore( wdi( 3, usi ) ); sout | usi; 81 81 82 82 signed int si; 83 sin | si; sout | si;84 sin | wdi( 3, si ); sout | si;85 sin | ignore( si ); sout | si;86 sin | ignore( wdi( 3, si ) ); sout | si;83 sin | si; sout | si; 84 sin | wdi( 3, si ); sout | si; 85 sin | ignore( si ); sout | si; 86 sin | ignore( wdi( 3, si ) ); sout | si; 87 87 88 88 unsigned int ui; 89 sin | ui; sout | ui;90 sin | wdi( 3, ui ); sout | ui;91 sin | ignore( ui ); sout | ui;92 sin | ignore( wdi( 3, ui ) ); sout | ui;89 sin | ui; sout | ui; 90 sin | wdi( 3, ui ); sout | ui; 91 sin | ignore( ui ); sout | ui; 92 sin | ignore( wdi( 3, ui ) ); sout | ui; 93 93 94 94 signed long int sli; 95 sin | sli; sout | sli;96 sin | wdi( 3, sli ); sout | sli;97 sin | ignore( sli ); sout | sli;98 sin | ignore( wdi( 3, sli ) ); sout | sli;95 sin | sli; sout | sli; 96 sin | wdi( 3, sli ); sout | sli; 97 sin | ignore( sli ); sout | sli; 98 sin | ignore( wdi( 3, sli ) ); sout | sli; 99 99 100 100 unsigned long int uli; 101 sin | uli; sout | uli;102 sin | wdi( 3, uli ); sout | uli;103 sin | ignore( uli ); sout | uli;104 sin | ignore( wdi( 3, uli ) ); sout | uli;101 sin | uli; sout | uli; 102 sin | wdi( 3, uli ); sout | uli; 103 sin | ignore( uli ); sout | uli; 104 sin | ignore( wdi( 3, uli ) ); sout | uli; 105 105 106 106 signed long long int slli; 107 sin | slli; sout | slli;108 sin | wdi( 3, slli ); sout | slli;109 sin | ignore( slli ); sout | slli;110 sin | ignore( wdi( 3, slli ) ); sout | slli;107 sin | slli; sout | slli; 108 sin | wdi( 3, slli ); sout | slli; 109 sin | ignore( slli ); sout | slli; 110 sin | ignore( wdi( 3, slli ) ); sout | slli; 111 111 112 112 unsigned long long int ulli; 113 sin | ulli; sout | ulli;114 sin | wdi( 3, ulli ); sout | ulli;115 sin | ignore( ulli ); sout | ulli;116 sin | ignore( wdi( 3, ulli ) ); sout | ulli;113 sin | ulli; sout | ulli; 114 sin | wdi( 3, ulli ); sout | ulli; 115 sin | ignore( ulli ); sout | ulli; 116 sin | ignore( wdi( 3, ulli ) ); sout | ulli; 117 117 118 118 float f; 119 sin | f; sout | f;120 sin | wdi( 8, f ); sout | f;121 sin | ignore( f ); sout | f;122 sin | ignore( wdi( 8, f ) ); sout | f;119 sin | f; sout | f; 120 sin | wdi( 8, f ); sout | f; 121 sin | ignore( f ); sout | f; 122 sin | ignore( wdi( 8, f ) ); sout | f; 123 123 124 124 double d; 125 sin | d; sout | d;126 sin | wdi( 8, d ); sout | d;127 sin | ignore( d ); sout | d;128 sin | ignore( wdi( 8, d ) ); sout | d;125 sin | d; sout | d; 126 sin | wdi( 8, d ); sout | d; 127 sin | ignore( d ); sout | d; 128 sin | ignore( wdi( 8, d ) ); sout | d; 129 129 130 130 long double ld; 131 sin | ld; sout | ld;132 sin | wdi( 8, ld ); sout | ld;133 sin | ignore( ld ); sout | ld;134 sin | ignore( wdi( 8, ld ) ); sout | ld;131 sin | ld; sout | ld; 132 sin | wdi( 8, ld ); sout | ld; 133 sin | ignore( ld ); sout | ld; 134 sin | ignore( wdi( 8, ld ) ); sout | ld; 135 135 136 136 float _Complex fc; 137 sin | fc; sout | fc;138 sin | wdi( 8, fc ); sout | fc;139 sin | ignore( fc ); sout | fc;140 sin | ignore( wdi( 8, fc ) ); sout | fc;137 sin | fc; sout | fc; 138 sin | wdi( 8, fc ); sout | fc; 139 sin | ignore( fc ); sout | fc; 140 sin | ignore( wdi( 8, fc ) ); sout | fc; 141 141 142 142 double _Complex dc; 143 sin | dc; sout | dc;144 sin | wdi( 8, dc ); sout | dc;145 sin | ignore( dc ); sout | dc;146 sin | ignore( wdi( 8, dc ) ); sout | dc;143 sin | dc; sout | dc; 144 sin | wdi( 8, dc ); sout | dc; 145 sin | ignore( dc ); sout | dc; 146 sin | ignore( wdi( 8, dc ) ); sout | dc; 147 147 148 148 long double _Complex ldc; 149 sin | ldc; sout | ldc;150 sin | wdi( 8, ldc ); sout | ldc;151 sin | ignore( ldc ); sout | ldc;152 sin | ignore( wdi( 8, ldc ) ); sout | ldc;149 sin | ldc; sout | ldc; 150 sin | wdi( 8, ldc ); sout | ldc; 151 sin | ignore( ldc ); sout | ldc; 152 sin | ignore( wdi( 8, ldc ) ); sout | ldc; 153 153 } 154 154 #if defined( __SIZEOF_INT128__ )
Note: See TracChangeset
for help on using the changeset viewer.