test: make delayed test independent of Qt version

The number of time the QQmlExpression was evaluated changed between 5.13
and 5.14
This commit is contained in:
Pierre-Yves Siret 2020-01-08 23:46:12 +01:00
parent 47ac3de0c1
commit 7921c92f5a
1 changed files with 6 additions and 4 deletions

View File

@ -117,10 +117,11 @@ Item {
expressionFilter.w.count = 0;
testFilterProxyModel.foo = 2;
compare(testFilterProxyModel.count, 0);
compare(expressionFilter.w.count, 4);
verify(expressionFilter.w.count > 1);
var lastEvaluationCount = expressionFilter.w.count;
wait(0);
compare(testFilterProxyModel.count, 0);
compare(expressionFilter.w.count, 4);
compare(expressionFilter.w.count, lastEvaluationCount);
}
function test_delayedFilters() {
@ -145,10 +146,11 @@ Item {
expressionSorter.w.count = 0;
testSorterProxyModel.foo = false;
compare(testSorterProxyModel.get(0).role1, 2);
compare(expressionSorter.w.count, 6);
verify(expressionSorter.w.count > 1);
var lastEvaluationCount = expressionSorter.w.count
wait(0);
compare(testSorterProxyModel.get(0).role1, 2);
compare(expressionSorter.w.count, 6);
compare(expressionSorter.w.count, lastEvaluationCount);
}
function test_delayedSorters() {