summaryrefslogtreecommitdiffstats
path: root/theme-compiler/tests
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2013-03-01 11:13:05 +0200
committerVaadin Code Review <review@vaadin.com>2013-03-01 09:22:28 +0000
commita2636a774d599ba0154a89c9c11744805cc06afa (patch)
tree097b2f6300cdd95fdb8220512ff47a835ddae3fd /theme-compiler/tests
parentefc8449d6f78050fc99a55f10cd0a1787b08b80e (diff)
downloadvaadin-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.java20
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.");
+ }
+ }
+
}