source: trunk/config.tests/unix/doubleformat/doubleformattest.cpp@ 7

Last change on this file since 7 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 606 bytes
Line 
1/*
2
3LE: strings | grep 0123ABCD0123ABCD
4BE: strings | grep DCBA3210DCBA3210
5
6LE arm-swaped-dword-order: strings | grep ABCD0123ABCD0123
7BE arm-swaped-dword-order: strings | grep 3210DCBA3210DCBA (untested)
8
9tested on x86, arm-le (gp), aix
10
11*/
12
13#include <stdlib.h>
14
15// equals static char c [] = "0123ABCD0123ABCD\0\0\0\0\0\0\0"
16static double d [] = { 710524581542275055616.0, 710524581542275055616.0};
17
18int main(int argc, char **argv)
19{
20 // make sure the linker doesn't throw away the arrays
21 double *d2 = (double *) d;
22 if (argc > 3)
23 d[1] += 1;
24 return d2[0] + d[2] + atof(argv[1]);
25}
Note: See TracBrowser for help on using the repository browser.