tests/auto/qscriptstring/tst_qscriptstring.cpp
changeset 18 2f34d5167611
parent 3 41300fa6a67c
child 19 fcece45ef507
--- a/tests/auto/qscriptstring/tst_qscriptstring.cpp	Tue Feb 02 00:43:10 2010 +0200
+++ b/tests/auto/qscriptstring/tst_qscriptstring.cpp	Fri Apr 16 15:50:13 2010 +0300
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 **
@@ -87,6 +87,8 @@
 
         QScriptString str2 = str;
         QVERIFY(!str2.isValid());
+
+        QCOMPARE(str.toArrayIndex(), quint32(0xffffffff));
     }
 
     for (int x = 0; x < 2; ++x) {
@@ -172,6 +174,7 @@
     QTest::newRow("0a") << QString::fromLatin1("0a") << false << quint32(0xffffffff);
     QTest::newRow("0x1") << QString::fromLatin1("0x1") << false << quint32(0xffffffff);
     QTest::newRow("01") << QString::fromLatin1("01") << false << quint32(0xffffffff);
+    QTest::newRow("101a") << QString::fromLatin1("101a") << false << quint32(0xffffffff);
     QTest::newRow("4294967294") << QString::fromLatin1("4294967294") << true << quint32(0xfffffffe);
     QTest::newRow("4294967295") << QString::fromLatin1("4294967295") << false << quint32(0xffffffff);
 }