summaryrefslogtreecommitdiffstats
path: root/theme-compiler
diff options
context:
space:
mode:
authorMarc Englund <marc@vaadin.com>2012-11-27 09:40:08 +0000
committerVaadin Code Review <review@vaadin.com>2012-11-27 09:40:08 +0000
commit3af04af7ba6ff654587ce80778a3c7dbfc5d6d78 (patch)
treeb9e0bd1d60e0e40763edd40c2dcf886195786401 /theme-compiler
parent4436e3f3a565474723f8450fdd3ab285ae12040d (diff)
parente8ef66d2d6dde9cb1b9b0fa0df24643c1e0f6f26 (diff)
downloadvaadin-framework-3af04af7ba6ff654587ce80778a3c7dbfc5d6d78.tar.gz
vaadin-framework-3af04af7ba6ff654587ce80778a3c7dbfc5d6d78.zip
Merge "Move some SCSS tests to be scanned automatically"
Diffstat (limited to 'theme-compiler')
-rw-r--r--theme-compiler/tests/resources/automatic/css/listmodify.css (renamed from theme-compiler/tests/resources/css/listmodify.css)0
-rw-r--r--theme-compiler/tests/resources/automatic/css/microsoft-extensions.css (renamed from theme-compiler/tests/resources/css/microsoft-extensions.css)0
-rw-r--r--theme-compiler/tests/resources/automatic/css/remove-directive.css (renamed from theme-compiler/tests/resources/css/remove-directive.css)0
-rw-r--r--theme-compiler/tests/resources/automatic/css/semicolons.css (renamed from theme-compiler/tests/resources/css/semicolons.css)0
-rw-r--r--theme-compiler/tests/resources/automatic/scss/listmodify.scss (renamed from theme-compiler/tests/resources/scss/listmodify.scss)0
-rw-r--r--theme-compiler/tests/resources/automatic/scss/microsoft-extensions.scss (renamed from theme-compiler/tests/resources/scss/microsoft-extensions.scss)0
-rw-r--r--theme-compiler/tests/resources/automatic/scss/remove-directive.scss (renamed from theme-compiler/tests/resources/scss/remove-directive.scss)0
-rw-r--r--theme-compiler/tests/resources/automatic/scss/semicolons.scss (renamed from theme-compiler/tests/resources/scss/semicolons.scss)0
-rw-r--r--theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AutomaticSassTests.java48
-rw-r--r--theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ListModify.java17
-rw-r--r--theme-compiler/tests/src/com/vaadin/sass/testcases/scss/MicrosoftExtensions.java34
-rw-r--r--theme-compiler/tests/src/com/vaadin/sass/testcases/scss/RemoveDirective.java25
-rw-r--r--theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Semicolons.java34
13 files changed, 48 insertions, 110 deletions
diff --git a/theme-compiler/tests/resources/css/listmodify.css b/theme-compiler/tests/resources/automatic/css/listmodify.css
index b07d5d9eef..b07d5d9eef 100644
--- a/theme-compiler/tests/resources/css/listmodify.css
+++ b/theme-compiler/tests/resources/automatic/css/listmodify.css
diff --git a/theme-compiler/tests/resources/css/microsoft-extensions.css b/theme-compiler/tests/resources/automatic/css/microsoft-extensions.css
index 18bc34ca6c..18bc34ca6c 100644
--- a/theme-compiler/tests/resources/css/microsoft-extensions.css
+++ b/theme-compiler/tests/resources/automatic/css/microsoft-extensions.css
diff --git a/theme-compiler/tests/resources/css/remove-directive.css b/theme-compiler/tests/resources/automatic/css/remove-directive.css
index 1e6d41c128..1e6d41c128 100644
--- a/theme-compiler/tests/resources/css/remove-directive.css
+++ b/theme-compiler/tests/resources/automatic/css/remove-directive.css
diff --git a/theme-compiler/tests/resources/css/semicolons.css b/theme-compiler/tests/resources/automatic/css/semicolons.css
index ba28e8cab4..ba28e8cab4 100644
--- a/theme-compiler/tests/resources/css/semicolons.css
+++ b/theme-compiler/tests/resources/automatic/css/semicolons.css
diff --git a/theme-compiler/tests/resources/scss/listmodify.scss b/theme-compiler/tests/resources/automatic/scss/listmodify.scss
index 814f3156f8..814f3156f8 100644
--- a/theme-compiler/tests/resources/scss/listmodify.scss
+++ b/theme-compiler/tests/resources/automatic/scss/listmodify.scss
diff --git a/theme-compiler/tests/resources/scss/microsoft-extensions.scss b/theme-compiler/tests/resources/automatic/scss/microsoft-extensions.scss
index 69670969de..69670969de 100644
--- a/theme-compiler/tests/resources/scss/microsoft-extensions.scss
+++ b/theme-compiler/tests/resources/automatic/scss/microsoft-extensions.scss
diff --git a/theme-compiler/tests/resources/scss/remove-directive.scss b/theme-compiler/tests/resources/automatic/scss/remove-directive.scss
index ca9a19522f..ca9a19522f 100644
--- a/theme-compiler/tests/resources/scss/remove-directive.scss
+++ b/theme-compiler/tests/resources/automatic/scss/remove-directive.scss
diff --git a/theme-compiler/tests/resources/scss/semicolons.scss b/theme-compiler/tests/resources/automatic/scss/semicolons.scss
index a4a56043d5..a4a56043d5 100644
--- a/theme-compiler/tests/resources/scss/semicolons.scss
+++ b/theme-compiler/tests/resources/automatic/scss/semicolons.scss
diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AutomaticSassTests.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AutomaticSassTests.java
new file mode 100644
index 0000000000..1e5ec1ad37
--- /dev/null
+++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AutomaticSassTests.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2011 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.sass.testcases.scss;
+
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Collection;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(Parameterized.class)
+public class AutomaticSassTests extends AbstractDirectoryScanningSassTests {
+
+ public AutomaticSassTests(String scssResourceName) {
+ super(scssResourceName);
+ }
+
+ @Override
+ protected URL getResourceURL(String path) {
+ return getResourceURLInternal(path);
+ }
+
+ private static URL getResourceURLInternal(String path) {
+ return AutomaticSassTests.class.getResource("/automatic" + path);
+ }
+
+ @Parameters
+ public static Collection<Object[]> getScssResourceNames()
+ throws URISyntaxException {
+ return getScssResourceNames(getResourceURLInternal(""));
+ }
+
+}
diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ListModify.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ListModify.java
deleted file mode 100644
index 4a65591f83..0000000000
--- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ListModify.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.vaadin.sass.testcases.scss;
-
-import org.junit.Test;
-
-import com.vaadin.sass.AbstractTestBase;
-
-public class ListModify extends AbstractTestBase {
-
- String scss = "/scss/listmodify.scss";
- String css = "/css/listmodify.css";
-
- @Test
- public void testCompiler() throws Exception {
- testCompiler(scss, css);
- }
-
-}
diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/MicrosoftExtensions.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/MicrosoftExtensions.java
deleted file mode 100644
index 5460700db4..0000000000
--- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/MicrosoftExtensions.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2011 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package com.vaadin.sass.testcases.scss;
-
-import org.junit.Test;
-
-import com.vaadin.sass.AbstractTestBase;
-
-/**
- * Test for Microsoft specific CSS extensions.
- */
-public class MicrosoftExtensions extends AbstractTestBase {
- String scss = "/scss/microsoft-extensions.scss";
- String css = "/css/microsoft-extensions.css";
-
- @Test
- public void testCompiler() throws Exception {
- testCompiler(scss, css);
- }
-}
diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/RemoveDirective.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/RemoveDirective.java
deleted file mode 100644
index e9e87e7b56..0000000000
--- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/RemoveDirective.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.vaadin.sass.testcases.scss;
-
-import java.io.IOException;
-
-import org.junit.Test;
-import org.w3c.css.sac.CSSException;
-
-import com.vaadin.sass.AbstractTestBase;
-
-public class RemoveDirective extends AbstractTestBase {
-
- String scss = "/scss/remove-directive.scss";
- String css = "/css/remove-directive.css";
-
- @Test
- public void testParser() throws CSSException, IOException {
-
- }
-
- @Test
- public void testCompiler() throws Exception {
- testCompiler(scss, css);
- }
-
-}
diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Semicolons.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Semicolons.java
deleted file mode 100644
index 9dd8a38bfe..0000000000
--- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Semicolons.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2011 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package com.vaadin.sass.testcases.scss;
-
-import org.junit.Test;
-
-import com.vaadin.sass.AbstractTestBase;
-
-/**
- * Test for missing and extraneous semicolon handling.
- */
-public class Semicolons extends AbstractTestBase {
- String scss = "/scss/semicolons.scss";
- String css = "/css/semicolons.css";
-
- @Test
- public void testCompiler() throws Exception {
- testCompiler(scss, css);
- }
-}