kerneltest/e32test/buffer/t_buf.cpp
changeset 109 b3a1d9898418
parent 0 a41df078684a
child 231 75252ea6123b
equal deleted inserted replaced
102:ef2a444a7410 109:b3a1d9898418
  1357 
  1357 
  1358 // Cannot do this on GCC (X86) because of "Cannot pass objects of non-POD type through '...'. Call will abort at runtime".
  1358 // Cannot do this on GCC (X86) because of "Cannot pass objects of non-POD type through '...'. Call will abort at runtime".
  1359 #if !(defined(__GCC32__) && defined(__X86__))
  1359 #if !(defined(__GCC32__) && defined(__X86__))
  1360 	const TAny* const zeroTerminatedString=(sizeof(S)==2)? (const TAny*)_S16(":-)E"): (const TAny*)_S8(":-)E");
  1360 	const TAny* const zeroTerminatedString=(sizeof(S)==2)? (const TAny*)_S16(":-)E"): (const TAny*)_S8(":-)E");
  1361 	const TInt dummyParameter=0;
  1361 	const TInt dummyParameter=0;
       
  1362 #ifdef __ARMCC__
       
  1363 #pragma push
       
  1364 #pragma diag_suppress 1446 
       
  1365 #endif
  1362 	Test14_ReorderedParameterFormatting(dummyParameter, 0x20ac, 11, 3, 13.89543, zeroTerminatedString, '!', TInt64(199), 2, &b, 6, 30005, TRealX(0.125), 0x8bdd);
  1366 	Test14_ReorderedParameterFormatting(dummyParameter, 0x20ac, 11, 3, 13.89543, zeroTerminatedString, '!', TInt64(199), 2, &b, 6, 30005, TRealX(0.125), 0x8bdd);
       
  1367 #ifdef __ARMCC__
       
  1368 #pragma pop
       
  1369 #endif
  1363 #endif
  1370 #endif
  1364 
  1371 
  1365 	test.Next(_L("Print some numbers"));
  1372 	test.Next(_L("Print some numbers"));
  1366 	TInt64 TI64 = MAKE_TINT64(0x101010u,0x10101010u);
  1373 	TInt64 TI64 = MAKE_TINT64(0x101010u,0x10101010u);
  1367 	test.Printf(_L("    %%ld: %ld\n"),TI64);
  1374 	test.Printf(_L("    %%ld: %ld\n"),TI64);
  1566 	aa.Format(_L("x%5.1fx"), 1.99);
  1573 	aa.Format(_L("x%5.1fx"), 1.99);
  1567 	test(aa==_L("x  2.0x"));
  1574 	test(aa==_L("x  2.0x"));
  1568 
  1575 
  1569 // Cannot do these on GCC (X86) because of "Cannot pass objects of non-POD type through '...'. Call will abort at runtime".
  1576 // Cannot do these on GCC (X86) because of "Cannot pass objects of non-POD type through '...'. Call will abort at runtime".
  1570 #if !(defined(__GCC32__) && defined(__X86__))
  1577 #if !(defined(__GCC32__) && defined(__X86__))
       
  1578 #ifdef __ARMCC__
       
  1579 #pragma push
       
  1580 #pragma diag_suppress 1446 
       
  1581 #endif
  1571 	aa.Format(_L("x%- 5Fx"), TRealX(6.2345678));
  1582 	aa.Format(_L("x%- 5Fx"), TRealX(6.2345678));
  1572 	test(aa==_L("x6.234568x"));
  1583 	test(aa==_L("x6.234568x"));
  1573 	aa.Format(_L("x%+ 5Fx"), TRealX(6.2345678));
  1584 	aa.Format(_L("x%+ 5Fx"), TRealX(6.2345678));
  1574 	test(aa==_L("x6.234568x"));
  1585 	test(aa==_L("x6.234568x"));
  1575 	aa.Format(_L("x% 5Fx"), TRealX(6.2345678));
  1586 	aa.Format(_L("x% 5Fx"), TRealX(6.2345678));
  1596 	test(aa==_L("x12,345,352,342.545000x"));
  1607 	test(aa==_L("x12,345,352,342.545000x"));
  1597 	aa.Format(_L("x%20.9Fx"), TRealX(1.0123456789));
  1608 	aa.Format(_L("x%20.9Fx"), TRealX(1.0123456789));
  1598 	test(aa==_L("x         1.012345679x"));
  1609 	test(aa==_L("x         1.012345679x"));
  1599 	aa.Format(_L("x%5.1Fx"), TRealX(1.99));
  1610 	aa.Format(_L("x%5.1Fx"), TRealX(1.99));
  1600 	test(aa==_L("x  2.0x"));
  1611 	test(aa==_L("x  2.0x"));
       
  1612 #ifdef __ARMCC__	
       
  1613 #pragma pop
       
  1614 #endif
  1601 #endif
  1615 #endif
  1602 
  1616 
  1603 	aa.Format(_L("x%- 5ex"), 6.2345678);
  1617 	aa.Format(_L("x%- 5ex"), 6.2345678);
  1604 	test(aa==_L("x6.234568E+00x"));
  1618 	test(aa==_L("x6.234568E+00x"));
  1605 	aa.Format(_L("x%+ 5ex"), 6.2345678);
  1619 	aa.Format(_L("x%+ 5ex"), 6.2345678);