summaryrefslogtreecommitdiffstats
path: root/config.tests/unix/doubleformat
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2009-03-23 09:18:55 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-03-23 09:18:55 (GMT)
commite5fcad302d86d316390c6b0f62759a067313e8a9 (patch)
treec2afbf6f1066b6ce261f14341cf6d310e5595bc1 /config.tests/unix/doubleformat
downloadQt-e5fcad302d86d316390c6b0f62759a067313e8a9.zip
Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.tar.gz
Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.tar.bz2
Long live Qt 4.5!
Diffstat (limited to 'config.tests/unix/doubleformat')
-rw-r--r--config.tests/unix/doubleformat/doubleformattest.cpp25
-rw-r--r--config.tests/unix/doubleformat/doubleformattest.pro3
2 files changed, 28 insertions, 0 deletions
diff --git a/config.tests/unix/doubleformat/doubleformattest.cpp b/config.tests/unix/doubleformat/doubleformattest.cpp
new file mode 100644
index 0000000..d71caba
--- /dev/null
+++ b/config.tests/unix/doubleformat/doubleformattest.cpp
@@ -0,0 +1,25 @@
+/*
+
+LE: strings | grep 0123ABCD0123ABCD
+BE: strings | grep DCBA3210DCBA3210
+
+LE arm-swaped-dword-order: strings | grep ABCD0123ABCD0123
+BE arm-swaped-dword-order: strings | grep 3210DCBA3210DCBA (untested)
+
+tested on x86, arm-le (gp), aix
+
+*/
+
+#include <stdlib.h>
+
+// equals static char c [] = "0123ABCD0123ABCD\0\0\0\0\0\0\0"
+static double d [] = { 710524581542275055616.0, 710524581542275055616.0};
+
+int main(int argc, char **argv)
+{
+ // make sure the linker doesn't throw away the arrays
+ double *d2 = (double *) d;
+ if (argc > 3)
+ d[1] += 1;
+ return d2[0] + d[2] + atof(argv[1]);
+}
diff --git a/config.tests/unix/doubleformat/doubleformattest.pro b/config.tests/unix/doubleformat/doubleformattest.pro
new file mode 100644
index 0000000..7e51dea
--- /dev/null
+++ b/config.tests/unix/doubleformat/doubleformattest.pro
@@ -0,0 +1,3 @@
+SOURCES = doubleformattest.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle