diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2011-04-19 13:55:10 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2011-04-19 13:55:10 (GMT) |
commit | f540574b44aa874af22ce8b15598b854f28517d7 (patch) | |
tree | 6e7b375107fdfeee54516ebc0cd52837a32035eb /tests/auto/lancelot | |
parent | 364ce5b7f5379499562b4f4f5a68da7ba068fe1e (diff) | |
parent | 8485052e3991aebf7c823b3e80fc06ccf9f08991 (diff) | |
download | Qt-f540574b44aa874af22ce8b15598b854f28517d7.zip Qt-f540574b44aa874af22ce8b15598b854f28517d7.tar.gz Qt-f540574b44aa874af22ce8b15598b854f28517d7.tar.bz2 |
Merge branch 'master-upstream'
Diffstat (limited to 'tests/auto/lancelot')
-rw-r--r-- | tests/auto/lancelot/scripts/hinting.qps | 26 | ||||
-rw-r--r-- | tests/auto/lancelot/tst_lancelot.cpp | 11 |
2 files changed, 36 insertions, 1 deletions
diff --git a/tests/auto/lancelot/scripts/hinting.qps b/tests/auto/lancelot/scripts/hinting.qps new file mode 100644 index 0000000..7ce21b2 --- /dev/null +++ b/tests/auto/lancelot/scripts/hinting.qps @@ -0,0 +1,26 @@ +translate 10 50 +setFont "sansserif" 10 +drawText 0 0 "Default hinting:" +setFont "times" 12 normal normal default +drawText 0 20 "The quick brown fox jumps over the lazy dog" + +translate 0 50 +setFont "sansserif" 10 +drawText 0 0 "No hinting:" +setFont "times" 12 normal normal none +drawText 0 20 "The quick brown fox jumps over the lazy dog" + +translate 0 50 +setFont "sansserif" 10 +drawText 0 0 "Vertical hinting:" +setFont "times" 12 normal normal vertical +drawText 0 20 "The quick brown fox jumps over the lazy dog" + +translate 0 50 +setFont "sansserif" 10 +drawText 0 0 "Full hinting:" +setFont "times" 12 normal normal full +drawText 0 20 "The quick brown fox jumps over the lazy dog" + + +# Note: there is also the textlayout_draw command which might be interesting here. diff --git a/tests/auto/lancelot/tst_lancelot.cpp b/tests/auto/lancelot/tst_lancelot.cpp index e515c48..9721665 100644 --- a/tests/auto/lancelot/tst_lancelot.cpp +++ b/tests/auto/lancelot/tst_lancelot.cpp @@ -239,11 +239,20 @@ void tst_Lancelot::runTestSuite(GraphicsEngine engine, QImage::Format format) QSKIP("Blacklisted by baseline server.", SkipSingle); ImageItem rendered = render(baseline, engine, format); + static int consecutiveErrs = 0; if (rendered.image.isNull()) { // Assume an error in the test environment, not Qt QWARN("Error: Failed to render image."); - QSKIP("Aborted due to errors.", SkipSingle); + if (++consecutiveErrs < 3) { + QSKIP("Aborted due to errors.", SkipSingle); + } else { + consecutiveErrs = 0; + QSKIP("Too many errors, skipping rest of testfunction.", SkipAll); + } + } else { + consecutiveErrs = 0; } + if (baseline.status == ImageItem::BaselineNotFound) { proto.submitNewBaseline(rendered, 0); QSKIP("Baseline not found; new baseline created.", SkipSingle); |