Browse Source

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
tags/7.0.2
Henri Sara 11 years ago
parent
commit
a2636a774d

+ 20
- 0
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTestsBroken.java View File

@@ -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.");
}
}

}

Loading…
Cancel
Save