- File:
-
- 1 edited
-
tests/array-collections/boxed.main.cfa (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/array-collections/boxed.main.cfa
r2e63915 rfd4df379 366 366 SHOW_ACCESS_1D(42) 367 367 } 368 char * allocAndAccess_13 ( size_t expectedElmSz, const char * tcid, const char * vart ) { 369 (void) vart; 368 char * allocAndAccess_13 ( size_t expectedElmSz, const char * tcid, const char * vart ) { 370 369 printf("------- 13%s (communication, mono-poly direct, by param T[]): char x[42], expecting %zd-byte elems\n", tcid, expectedElmSz); 371 370 char x[ 42 ] INITARR; … … 374 373 return 0p; 375 374 } 376 bigun * allocAndAccess_13( size_t expectedElmSz, const char * tcid, const char * vart ) { 377 (void) vart; 375 bigun * allocAndAccess_13( size_t expectedElmSz, const char * tcid, const char * vart ) { 378 376 printf("------- 13%s (communication, mono-poly direct, by param T[]): bigun x[42], expecting %zd-byte elems\n", tcid, expectedElmSz); 379 377 bigun x[ 42 ] INITARR; … … 385 383 // ---------- 14, comm, MPD, PARR 386 384 387 forall( T* ) void access_14 ( size_t expectedElmSz, T (*temp)[42] ) { 385 forall( T* ) void access_14 ( size_t expectedElmSz, T (*temp)[42] ) { 388 386 T * x = *temp; 389 387 SHOW_ACCESS_1D(42) 390 388 } 391 double * allocAndAccess_14 ( size_t expectedElmSz, const char * tcid, const char * vart ) { 392 (void) vart; 389 double * allocAndAccess_14 ( size_t expectedElmSz, const char * tcid, const char * vart ) { 393 390 printf("------- 13%s (communication, mono-poly direct, by param T(*)[*]): double x[42], expecting %zd-byte elems\n", tcid, expectedElmSz); 394 391 double x[ 42 ] INITARR; … … 400 397 // ---------- 15, operators 401 398 402 forall( T* ) void access_15 ( T x[] ) {399 forall( T* ) void access_15 ( size_t expectedElmSz, T x[] ) { 403 400 // correctness of x and ?[?] established by earlier tests 404 401 T * x5 = & x[5]; … … 417 414 418 415 ptrdiff_t expPos5 = x5 - x; 419 //ptrdiff_t expNeg5 = x - x5;416 ptrdiff_t expNeg5 = x - x5; 420 417 421 418 printf( "?-? +ve off by %zd\n", ((ptrdiff_t) 5) - expPos5 ); … … 424 421 425 422 forall( T ) T * allocAndAccess_15 ( size_t expectedElmSz, const char * tcid, const char * vart ) { 426 (void) expectedElmSz;427 423 printf("------- 15%s (operators): T x[42], expecting T=%s, got sizeof(T)=%zd, expecting %zd-byte elems\n", tcid, vart, sizeof(T), expectedElmSz); 428 424 T x[ 42 ] INITARR; 429 425 // bookends unused 430 access_15( x );426 access_15( expectedElmSz, x ); 431 427 return 0p; 432 428 }
Note:
See TracChangeset
for help on using the changeset viewer.