Autotest: Fix unexpected rounding of floating point in date tests
authorThiago Macieira <thiago.macieira@intel.com>
Fri, 27 Sep 2013 21:48:07 +0000 (14:48 -0700)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 27 Sep 2013 23:04:23 +0000 (01:04 +0200)
commit421ee46b982d274fe7e7a2f7a4269e39134d31d2
tree9a82acc53c9fc23b9624d2fd4f1a09caaddff5f4
parent11d1068aa72df599ce2d44e607456b089ec2b84d
Autotest: Fix unexpected rounding of floating point in date tests

QString("new Date(%0)").arg(1380318500 * 1000.0) expands to "new
Date(1.38032e+12)". That's an unnecessary rounding and cuts off
interesting bits out of the date.

It took me quite a while debugging QScriptEngine trying to find out
why the time_t and the JS Date internal numbers were different.

Change-Id: Id880f3f11edd0af07e1726eac0242d4a9625c368
Reviewed-by: John Layt <jlayt@kde.org>
tests/auto/qscriptengine/tst_qscriptengine.cpp