bugDotGNU Portable.NET - Bugs: bug #5057, TestDecimalParse test case broken...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #5057: TestDecimalParse test case broken by locale settings.

Submitter:  Adrian Perez Jorge <adrianpj>
Submitted:  Wed 03 Sep 2003 06:14:41 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Thu 04 Sep 2003 03:44:44 AM UTC, comment #1: 

I've modified the CVS version to force the locale to "C"
when running tests.  You will need to re-run "./configure"
to get the change.

Rhys Weatherley <rweather>
Group administrator
Wed 03 Sep 2003 06:14:41 PM UTC, original submission:  

It seems locale is not taken into account in this test.

LC_ALL=es_ES
LANG=es_ES.ISO-8859-1

It works when LC_ALL=C and LANG=C


$ make check
Making check in runtime
make[1]: Entering directory `/rescue/dotGNU/src/pnetlib/tests/runtime'
"/rescue/dotGNU/bin/csant" --compiler cscc -Dcscc="/rescue/dotGNU/bin/cscc" -Dcscc.plugins.cs="/rescue/dotGNU/lib/cscc/plugins/cscc-cs" --profile "../../profiles/full" -f Testruntime.build all
Building project `pnetlib Testruntime'
Building target `all' for project `pnetlib Testruntime'
Leaving target `all' for project `pnetlib Testruntime'
Ending project `pnetlib Testruntime'
make  check-TESTS
make[2]: Entering directory `/rescue/dotGNU/src/pnetlib/tests/runtime'

Suite: Runtime Tests


Suite: Core Class Tests

TestArrayBinarySearch ... ok
TestArrayClear ... ok
TestArrayCopy ... ok
TestArraySort ... ok
TestBooleanConstants ... ok
TestBooleanCompareTo ... ok
TestBooleanEquals ... ok
TestBooleanGetHashCode ... ok
TestBooleanParse ... ok
TestBooleanToString ... ok
TestBooleanIConvertible ... ok
TestDecimalParse ... threw exception: System.FormatException: The supplied value did not have the correct format
at System.Private.NumberParser.ParseDecimal(String, NumberStyles, NumberFormatInfo) in ./System/Private/NumberParser.cs:1099
at System.Decimal.Parse(String, NumberStyles, IFormatProvider) in ./System/Decimal.cs:327
at System.Decimal.Parse(String) in ./System/Decimal.cs:332
at TestDecimal.TestDecimalParse() in ./System/TestDecimal.cs:50
at System.Reflection.ClrMethod.Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
at System.Reflection.MethodBase.Invoke(Object, Object[]) in ./System/Reflection/MethodBase.cs:58
at CSUnit.TestCase.RunTest() in ./TestCase.cs:104
at CSUnit.TestCase.Run(TestResult) in ./TestCase.cs:47
at CSUnit.TestSuite.Run(TestResult) in ./TestSuite.cs:103
at CSUnit.TestSuite.Run(TestResult) in ./TestSuite.cs:103
at CSUnit.TestMain.Main(String[]) in ./TestMain.cs:247

TestDecimalToString ... failed: CSUnit.TestAssertFailed: Test failed: 1.13 expected: <1.13>, but was: <1,13>
at CSUnit.TestCase.Fail(String) in ./TestCase.cs:148
at CSUnit.TestCase.EqFail(String, Object, Object) in ./TestCase.cs:192
at CSUnit.TestCase.AssertEquals(String, String, String) in ./TestCase.cs:283
at TestDecimal.TestDecimalToString() in ./System/TestDecimal.cs:85
at System.Reflection.ClrMethod.Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
at System.Reflection.MethodBase.Invoke(Object, Object[]) in ./System/Reflection/MethodBase.cs:58
at CSUnit.TestCase.RunTest() in ./TestCase.cs:104
at CSUnit.TestCase.Run(TestResult) in ./TestCase.cs:47
at CSUnit.TestSuite.Run(TestResult) in ./TestSuite.cs:103
at CSUnit.TestSuite.Run(TestResult) in ./TestSuite.cs:103
at CSUnit.TestMain.Main(String[]) in ./TestMain.cs:247

TestDoubleParse ... ok
TestDoubleToString ... failed: CSUnit.TestAssertFailed: Test failed: 1.13 expected: <1.13>, but was: <1,13>
at CSUnit.TestCase.Fail(String) in ./TestCase.cs:148
at CSUnit.TestCase.EqFail(String, Object, Object) in ./TestCase.cs:192
at CSUnit.TestCase.AssertEquals(String, String, String) in ./TestCase.cs:283
at TestDouble.TestDoubleToString() in ./System/TestDouble.cs:85
at System.Reflection.ClrMethod.Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
at System.Reflection.MethodBase.Invoke(Object, Object[]) in ./System/Reflection/MethodBase.cs:58
at CSUnit.TestCase.RunTest() in ./TestCase.cs:104
at CSUnit.TestCase.Run(TestResult) in ./TestCase.cs:47
at CSUnit.TestSuite.Run(TestResult) in ./TestSuite.cs:103
at CSUnit.TestSuite.Run(TestResult) in ./TestSuite.cs:103
at CSUnit.TestMain.Main(String[]) in ./TestMain.cs:247

TestSByteParseString0 ... ok
[snipped]

Adrian Perez Jorge <adrianpj>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2003-09-04 rweather StatusNone None
    Open/ClosedOpen None

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code