This is an automated email from the git hooks/post-receive script. sylvestre pushed a commit to branch master in repository jscover.
commit 8b4bebb1a6547722d8c4c2ed4f8ac4dc534b8e1b Author: tntim96 <[email protected]> Date: Fri Jun 20 18:41:13 2014 +1000 Fix locale test issues --- History.md | 4 ++ JSCover.ipr | 72 ++++++++++++++++++++++ .../report/xml/XMLSummaryIntegrationTest.java | 7 +++ .../java/jscover/report/xml/XMLSummaryTest.java | 7 +++ 4 files changed, 90 insertions(+) diff --git a/History.md b/History.md index 73c8670..387c79b 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,7 @@ +1.0.12 / 2014-??-?? +================== + * Internal: Fix tests failing with non-english locale (https://github.com/tntim96/JSCover/issues/141) + 1.0.11 / 2014-06-05 ================== * Improve error when 'Class-Path' not in manifest (https://github.com/tntim96/JSCover/pull/135) diff --git a/JSCover.ipr b/JSCover.ipr index d58191d..37fcd16 100644 --- a/JSCover.ipr +++ b/JSCover.ipr @@ -626,6 +626,78 @@ <ConfigurationWrapper RunnerId="Run" /> <method /> </configuration> + <configuration default="false" name="JSCover - Acceptance" type="JUnit" factoryName="JUnit"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <module name="JSCover" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" value="" /> + <option name="PACKAGE_NAME" /> + <option name="MAIN_CLASS_NAME" value="" /> + <option name="METHOD_NAME" value="" /> + <option name="TEST_OBJECT" value="directory" /> + <option name="VM_PARAMETERS" value="-ea" /> + <option name="PARAMETERS" value="" /> + <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <option name="TEST_SEARCH_SCOPE"> + <value defaultName="moduleWithDependencies" /> + </option> + <envs /> + <dir value="$PROJECT_DIR$/src/test-acceptance/java" /> + <patterns /> + <RunnerSettings RunnerId="Run" /> + <ConfigurationWrapper RunnerId="Run" /> + <method /> + </configuration> + <configuration default="false" name="JSCover - Integration" type="JUnit" factoryName="JUnit"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <module name="JSCover" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" value="" /> + <option name="PACKAGE_NAME" /> + <option name="MAIN_CLASS_NAME" value="" /> + <option name="METHOD_NAME" value="" /> + <option name="TEST_OBJECT" value="directory" /> + <option name="VM_PARAMETERS" value="-ea" /> + <option name="PARAMETERS" value="" /> + <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <option name="TEST_SEARCH_SCOPE"> + <value defaultName="moduleWithDependencies" /> + </option> + <envs /> + <dir value="$PROJECT_DIR$/src/test-integration/java" /> + <patterns /> + <RunnerSettings RunnerId="Run" /> + <ConfigurationWrapper RunnerId="Run" /> + <method /> + </configuration> + <configuration default="false" name="JSCover - Unit" type="JUnit" factoryName="JUnit"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <module name="JSCover" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" value="" /> + <option name="PACKAGE_NAME" /> + <option name="MAIN_CLASS_NAME" value="" /> + <option name="METHOD_NAME" value="" /> + <option name="TEST_OBJECT" value="directory" /> + <option name="VM_PARAMETERS" value="-ea" /> + <option name="PARAMETERS" value="" /> + <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <option name="TEST_SEARCH_SCOPE"> + <value defaultName="moduleWithDependencies" /> + </option> + <envs /> + <dir value="$PROJECT_DIR$/src/test/java" /> + <patterns /> + <RunnerSettings RunnerId="Run" /> + <ConfigurationWrapper RunnerId="Run" /> + <method /> + </configuration> </component> <component name="VcsDirectoryMappings"> <mapping directory="$PROJECT_DIR$" vcs="Git" /> diff --git a/src/test-integration/java/jscover/report/xml/XMLSummaryIntegrationTest.java b/src/test-integration/java/jscover/report/xml/XMLSummaryIntegrationTest.java index c25bf57..32ff037 100644 --- a/src/test-integration/java/jscover/report/xml/XMLSummaryIntegrationTest.java +++ b/src/test-integration/java/jscover/report/xml/XMLSummaryIntegrationTest.java @@ -346,6 +346,7 @@ import jscover.report.JSONDataMerger; import jscover.report.SummaryData; import jscover.util.IoUtils; import org.junit.After; +import org.junit.BeforeClass; import org.junit.Test; import org.w3c.dom.Document; @@ -355,6 +356,7 @@ import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import java.io.File; +import java.util.Locale; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; @@ -364,6 +366,11 @@ public class XMLSummaryIntegrationTest { private JSONDataMerger jsonDataMerger = new JSONDataMerger(); private File dest; + @BeforeClass + public static void setUpOnce() { + Locale.setDefault(Locale.ENGLISH); + } + @After public void tearDown() { dest.delete(); diff --git a/src/test/java/jscover/report/xml/XMLSummaryTest.java b/src/test/java/jscover/report/xml/XMLSummaryTest.java index 58f5208..1c27bc3 100644 --- a/src/test/java/jscover/report/xml/XMLSummaryTest.java +++ b/src/test/java/jscover/report/xml/XMLSummaryTest.java @@ -343,6 +343,7 @@ Public License instead of this License. package jscover.report.xml; import jscover.report.Coverable; +import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -355,6 +356,7 @@ import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import java.io.ByteArrayInputStream; +import java.util.Locale; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; @@ -365,6 +367,11 @@ public class XMLSummaryTest { private XMLSummary xmlSummary = new XMLSummary(); @Mock Coverable data; + @BeforeClass + public static void setUpOnce() { + Locale.setDefault(Locale.ENGLISH); + } + @Test public void shouldGenerateSummaryXML() throws Exception { given(data.getCodeLineCount()).willReturn(1); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jscover.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

