Browse Source

- Reverted changes to display decimal.MinValue and decimal.MaxValue

- Altered InitializerTests to use constant literals instead of decimal.MinValue and decimal.MaxValue
pull/252/head
Alex Lyman 14 years ago committed by Daniel Grunwald
parent
commit
ed6380077f
  1. 4
      ICSharpCode.Decompiler/Tests/InitializerTests.cs
  2. 11
      NRefactory/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs

4
ICSharpCode.Decompiler/Tests/InitializerTests.cs

@ -297,8 +297,8 @@ public class InitializerTests @@ -297,8 +297,8 @@ public class InitializerTests
-100m,
0m,
100m,
decimal.MinValue,
decimal.MaxValue,
-79228162514264337593543950335m,
79228162514264337593543950335m,
0.0000001m
});
}

11
NRefactory/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs

@ -873,17 +873,6 @@ namespace ICSharpCode.NRefactory.CSharp @@ -873,17 +873,6 @@ namespace ICSharpCode.NRefactory.CSharp
formatter.WriteToken("'" + ConvertCharLiteral((char)val) + "'");
lastWritten = LastWritten.Other;
} else if (val is decimal) {
decimal d = (decimal) val;
if (d == decimal.MinValue || d == decimal.MaxValue)
{
WriteKeyword("decimal");
WriteToken(".", AstNode.Roles.Dot);
if (d == decimal.MinValue)
WriteIdentifier("MinValue");
else
WriteIdentifier("MaxValue");
return;
}
formatter.WriteToken(((decimal)val).ToString(NumberFormatInfo.InvariantInfo) + "m");
lastWritten = LastWritten.Other;
} else if (val is float) {

Loading…
Cancel
Save