Changes in tests/PRNG.cfa [20cf96d:ae7a085c]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/PRNG.cfa
r20cf96d rae7a085c 8 8 // Created On : Wed Dec 29 09:38:12 2021 9 9 // Last Modified By : Peter A. Buhr 10 // Last Modified On : Tue Nov 22 22:51:12202211 // Update Count : 38110 // Last Modified On : Wed Dec 21 20:39:59 2022 11 // Update Count : 406 12 12 // 13 13 … … 60 60 61 61 62 unsigned int seed = 1009;62 size_t seed = 1009; 63 63 64 64 thread T1 {}; … … 116 116 } // dummy 117 117 118 118 119 int main() { 119 120 // causes leaked storage message 120 // setlocale( LC_NUMERIC, getenv( "LANG" ) ); // print digit separator 121 // setlocale( LC_NUMERIC, getenv( "LANG" ) ); // print digit separator 122 // locale_t loc = newlocale( LC_NUMERIC_MASK, getenv( "LANG" ), (locale_t)0p ); 123 // if ( loc == (locale_t)0p ) abort( "newlocale" ); 124 // uselocale( loc ); 121 125 122 126 enum { TASKS = 4 }; … … 130 134 131 135 sout | sepDisable; 132 sout | wd( 13, "rand()" ) | wd(10, "rand(5)") | wd(13, "rand(0,5)" );133 for ( 20 ) { 134 sout | wd( 13, rand()) | nonl;135 sout | wd(1 0, rand() % 5) | nonl;136 sout | wd(1 3, rand() % (5 - 0 + 1) + 0);136 sout | wd(26, "rand()" ) | wd(12, "rand(5)") | wd(12, "rand(0,5)" ); 137 for ( 20 ) { 138 sout | wd(26, rand()) | nonl; 139 sout | wd(12, rand() % 5) | nonl; 140 sout | wd(12, rand() % (5 - 0 + 1) + 0); 137 141 } // for 138 142 sout | sepEnable; … … 168 172 169 173 sout | sepDisable; 170 sout | nl | wd( 13, "PRNG()" ) | wd(10, "PRNG(5)") | wd(13, "PRNG(0,5)" );171 for ( 20 ) { 172 sout | wd( 13, prng( prng )) | nonl; // cascading => side-effect functions called in arbitary order173 sout | wd(1 0, prng( prng, 5 )) | nonl;174 sout | wd(1 3, prng( prng, 0, 5 ));174 sout | nl | wd(26, "PRNG()" ) | wd(12, "PRNG(5)") | wd(12, "PRNG(0,5)" ); 175 for ( 20 ) { 176 sout | wd(26, prng( prng )) | nonl; // cascading => side-effect functions called in arbitary order 177 sout | wd(12, prng( prng, 5 )) | nonl; 178 sout | wd(12, prng( prng, 0, 5 )); 175 179 } // for 176 180 sout | sepEnable; … … 203 207 204 208 sout | sepDisable; 205 sout | nl | wd( 13, "prng()" ) | wd(10, "prng(5)") | wd(13, "prng(0,5)" );206 for ( 20 ) { 207 sout | wd( 13, prng()) | nonl; // cascading => side-effect functions called in arbitary order208 sout | wd(1 0, prng( 5 )) | nonl;209 sout | wd(1 3, prng( 0, 5 ));209 sout | nl | wd(26, "prng()" ) | wd(12, "prng(5)") | wd(12, "prng(0,5)" ); 210 for ( 20 ) { 211 sout | wd(26, prng()) | nonl; // cascading => side-effect functions called in arbitary order 212 sout | wd(12, prng( 5 )) | nonl; 213 sout | wd(12, prng( 0, 5 )); 210 214 } // for 211 215 sout | sepEnable; … … 239 243 240 244 sout | sepDisable; 241 sout | nl | wd( 13, "prng(t)" ) | wd(10, "prng(t,5)") | wd(13, "prng(t,0,5)" );242 for ( 20 ) { 243 sout | wd( 13, prng( th )) | nonl; // cascading => side-effect functions called in arbitary order244 sout | wd(1 0, prng( th, 5 )) | nonl;245 sout | wd(1 3, prng( th, 0, 5 ));245 sout | nl | wd(26, "prng(t)" ) | wd(12, "prng(t,5)") | wd(12, "prng(t,0,5)" ); 246 for ( 20 ) { 247 sout | wd(26, prng( th )) | nonl; // cascading => side-effect functions called in arbitary order 248 sout | wd(12, prng( th, 5 )) | nonl; 249 sout | wd(12, prng( th, 0, 5 )); 246 250 } // for 247 251 sout | sepEnable; … … 266 270 #endif // 0 267 271 // malloc_stats(); 272 // freelocale( loc ); 268 273 } // main 269 274
Note: See TracChangeset
for help on using the changeset viewer.