diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-13 00:22:47 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-13 00:22:47 (GMT) |
commit | b417ed17f15d88eeac21c46fa666af37b69d4531 (patch) | |
tree | 946c6c98cc75cfdf735d4d555b97302729fe7609 /tests/auto | |
parent | f2b0e6ed97b962f9d6412acaa473f51ba4e23da0 (diff) | |
download | Qt-b417ed17f15d88eeac21c46fa666af37b69d4531.zip Qt-b417ed17f15d88eeac21c46fa666af37b69d4531.tar.gz Qt-b417ed17f15d88eeac21c46fa666af37b69d4531.tar.bz2 |
More tests
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/declarative/qmlparser/assignTypeExtremes.txt | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qmlparser/tst_qmlparser.cpp | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlparser/assignTypeExtremes.txt b/tests/auto/declarative/qmlparser/assignTypeExtremes.txt new file mode 100644 index 0000000..dbd281a --- /dev/null +++ b/tests/auto/declarative/qmlparser/assignTypeExtremes.txt @@ -0,0 +1,4 @@ +MyTypeObject { + uintProperty: 4000000000 + intProperty: -2000000000 +} diff --git a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp index 1a35d72..8be3311 100644 --- a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp +++ b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp @@ -386,6 +386,7 @@ private slots: void assignObjectToSignal(); void assignQmlComponent(); void assignBasicTypes(); + void assignTypeExtremes(); void customParserTypes(); void rootAsQmlComponent(); void inlineQmlComponents(); @@ -598,6 +599,16 @@ void tst_qmlparser::assignBasicTypes() QCOMPARE(child->intProperty(), 8); } +// Test edge case type assignments +void tst_qmlparser::assignTypeExtremes() +{ + QmlComponent component(&engine, TEST_FILE("assignTypeExtremes.txt")); + MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); + QVERIFY(object != 0); + QCOMPARE(object->uintProperty(), 0xEE6B2800); + QCOMPARE(object->intProperty(), -0x77359400); +} + // Tests that custom parser tyeps can be instantiated void tst_qmlparser::customParserTypes() { |