Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
65c2dfb7
Commit
65c2dfb7
authored
Mar 31, 2010
by
Marco Bubke
Committed by
Kai Koehne
Mar 31, 2010
Browse files
Fix rewriter test
parent
1b04e490
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/auto/qml/qmldesigner/coretests/testcore.cpp
View file @
65c2dfb7
...
...
@@ -431,6 +431,7 @@ void TestCore::testRewriterDynamicProperties()
// text2model
//
ModelNode
rootModelNode
=
testRewriterView1
->
rootModelNode
();
QCOMPARE
(
rootModelNode
.
properties
().
count
(),
18
);
QVERIFY
(
rootModelNode
.
hasVariantProperty
(
"i"
));
QCOMPARE
(
rootModelNode
.
variantProperty
(
"i"
).
dynamicTypeName
(),
QString
(
"int"
));
QCOMPARE
(
rootModelNode
.
variantProperty
(
"i"
).
value
().
type
(),
QVariant
::
Int
);
...
...
@@ -2183,7 +2184,6 @@ void TestCore::testRewriterPropertyDeclarations()
" property int intProperty
\n
"
" property bool boolProperty: true
\n
"
" property var varProperty1
\n
"
" property variant varProperty2: boolProperty
\n
"
" default property url urlProperty
\n
"
" intProperty: 2
\n
"
"}
\n
"
;
...
...
@@ -2203,6 +2203,8 @@ void TestCore::testRewriterPropertyDeclarations()
testRewriterView
->
setTextModifier
(
&
textModifier
);
model
->
attachView
(
testRewriterView
.
data
());
QVERIFY
(
testRewriterView
->
errors
().
isEmpty
());
//
// parsing
//
...
...
@@ -2210,7 +2212,7 @@ void TestCore::testRewriterPropertyDeclarations()
QVERIFY
(
rootModelNode
.
isValid
());
QCOMPARE
(
rootModelNode
.
type
(),
QString
(
"Qt/Item"
));
QCOMPARE
(
rootModelNode
.
properties
().
size
(),
5
);
QCOMPARE
(
rootModelNode
.
properties
().
size
(),
4
);
VariantProperty
intProperty
=
rootModelNode
.
property
(
QLatin1String
(
"intProperty"
)).
toVariantProperty
();
QVERIFY
(
intProperty
.
isValid
());
...
...
@@ -2224,7 +2226,6 @@ void TestCore::testRewriterPropertyDeclarations()
VariantProperty
varProperty1
=
rootModelNode
.
property
(
QLatin1String
(
"varProperty1"
)).
toVariantProperty
();
QVERIFY
(
varProperty1
.
isValid
());
QVERIFY
(
varProperty1
.
isVariantProperty
());
QCOMPARE
(
varProperty1
.
value
(),
QVariant
());
VariantProperty
urlProperty
=
rootModelNode
.
property
(
QLatin1String
(
"urlProperty"
)).
toVariantProperty
();
QVERIFY
(
urlProperty
.
isValid
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment