Complex.ToString must not pass format string to string.Format
authorChristoph Ruegg <git@cdrnet.ch>
Sun, 9 Jun 2013 13:08:53 +0000 (15:08 +0200)
committerChristoph Ruegg <git@cdrnet.ch>
Sun, 9 Jun 2013 14:19:43 +0000 (16:19 +0200)
commit9f43b4c8225dee984e11bd556d4839ceeb0d1211
tree70081e0828496e476e982d3496a06bbde941028d
parente4a5774ba8ca6d473733f7e8c356b9d38dd7e306
Complex.ToString must not pass format string to string.Format

Type: System.Numerics.Complex

IFormattable format strings and string.Format formats are different
and incompatible. For example, `x.ToString("G")` and `x.ToString(null)`
must be equivalent to `x.ToString()`, but they behave very differently
with string.Format, where the former just returns "G" and the latter
throws an ArgumentNullException.

Changes System.Numerics.Complex.ToString to pass the format string to
double.ToString instead of string.Format.

Adds UnitTests for the changes in new ComplexTest.cs file
mcs/class/System.Numerics/System.Numerics-tests-net_4_0.csproj
mcs/class/System.Numerics/System.Numerics-tests-net_4_5.csproj
mcs/class/System.Numerics/System.Numerics/ChangeLog
mcs/class/System.Numerics/System.Numerics/Complex.cs
mcs/class/System.Numerics/System.Numerics_test.dll.sources
mcs/class/System.Numerics/Test/System.Numerics/ChangeLog
mcs/class/System.Numerics/Test/System.Numerics/ComplexTest.cs [new file with mode: 0644]