Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decimal format: support any decimal delimiter #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ericabouaf
Copy link

Hi,

The french local uses commas instead of dots for decimal numbers.

The Coverage report fails badly :

Can't get property calledLinePercentageName using method get/isCalledLinePercentageName from com.yahoo.platform.yuitest.coverage.results.SummaryCoverageReport instance
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.antlr.stringtemplate.language.ASTExpr.invokeMethod(ASTExpr.java:564)
at org.antlr.stringtemplate.language.ASTExpr.rawGetObjectProperty(ASTExpr.java:515)
at org.antlr.stringtemplate.language.ASTExpr.getObjectProperty(ASTExpr.java:417)
at org.antlr.stringtemplate.language.ActionEvaluator.attribute(ActionEvaluator.java:351)
at org.antlr.stringtemplate.language.ActionEvaluator.expr(ActionEvaluator.java:136)
at org.antlr.stringtemplate.language.ActionEvaluator.action(ActionEvaluator.java:84)
at org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:149)
at org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:705)
at org.antlr.stringtemplate.StringTemplate.toString(StringTemplate.java:1670)
at org.antlr.stringtemplate.StringTemplate.toString(StringTemplate.java:1661)
at com.yahoo.platform.yuitest.writers.StringTemplateWriter.write(StringTemplateWriter.java:109)
at com.yahoo.platform.yuitest.coverage.report.LCOVReportGenerator.generateIndexPage(LCOVReportGenerator.java:164)
at com.yahoo.platform.yuitest.coverage.report.LCOVReportGenerator.generate(LCOVReportGenerator.java:76)
at com.yahoo.platform.yuitest.selenium.SessionResultFileGenerator.generateCoverageFiles(SessionResultFileGenerator.java:135)
at com.yahoo.platform.yuitest.selenium.SessionResultFileGenerator.generateAll(SessionResultFileGenerator.java:62)
at com.yahoo.platform.yuitest.selenium.YUITestSeleniumDriver.main(YUITestSeleniumDriver.java:195)
Caused by: java.lang.NumberFormatException: For input string: "37,5"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
at java.lang.Double.valueOf(Double.java:475)
at com.yahoo.platform.yuitest.coverage.results.SummaryCoverageReport.getCalledLinePercentage(SummaryCoverageReport.java:196)
at com.yahoo.platform.yuitest.coverage.results.SummaryCoverageReport.getCalledLinePercentageName(SummaryCoverageReport.java:206)
... 20 more

My fix is not very nice but works : ericabouaf@6cce5cc

… decimals. (my french local uses commas instead of dots for DecimalFormat)
yuibuild pushed a commit that referenced this pull request Oct 25, 2011
@ghost ghost assigned nzakas Feb 1, 2012
juanramirez pushed a commit to juanramirez/yuitest that referenced this pull request Jul 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants