diff options
author | Henri Sara <hesara@vaadin.com> | 2013-03-01 11:13:05 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-03-01 09:22:28 +0000 |
commit | a2636a774d599ba0154a89c9c11744805cc06afa (patch) | |
tree | 097b2f6300cdd95fdb8220512ff47a835ddae3fd /theme-compiler/tests | |
parent | efc8449d6f78050fc99a55f10cd0a1787b08b80e (diff) | |
download | vaadin-framework-a2636a774d599ba0154a89c9c11744805cc06afa.tar.gz vaadin-framework-a2636a774d599ba0154a89c9c11744805cc06afa.zip |
Make SassLangTestsBroken pass iff the CSS and SCSS do not match.
This makes builds pass, and gives a clearer message if one of the
previously broken tests have been fixed.
Change-Id: I6e5b2d9771615abbcb611f28d50ebdefcaa01ae2
Diffstat (limited to 'theme-compiler/tests')
-rw-r--r-- | theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTestsBroken.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTestsBroken.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTestsBroken.java index 2a0bc8e08d..6b812a6940 100644 --- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTestsBroken.java +++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTestsBroken.java @@ -19,7 +19,9 @@ import java.net.URISyntaxException; import java.net.URL; import java.util.Collection; +import org.junit.Assert; import org.junit.runner.RunWith; +import org.w3c.css.sac.CSSException; import com.vaadin.sass.testcases.scss.SassTestRunner.TestFactory; @@ -47,4 +49,22 @@ public class SassLangTestsBroken extends AbstractDirectoryScanningSassTests { return getScssResourceNames(getResourceURLInternal("")); } + @Override + public void compareScssWithCss(String scssResourceName) throws Exception { + boolean success = false; + try { + super.compareScssWithCss(scssResourceName); + success = true; + } catch (CSSException e) { + // this is an expected outcome + } catch (AssertionError e) { + // this is an expected outcome + } + if (success) { + Assert.fail("Test " + + scssResourceName + + " from sasslangbroken that was expected to fail has been fixed. Please move the corresponding CSS and SCSS files to sasslang."); + } + } + } |