From ed6380077f355f16da85e3b614a6c4a030cca0f2 Mon Sep 17 00:00:00 2001 From: Alex Lyman Date: Tue, 14 Jun 2011 14:52:35 -0700 Subject: [PATCH] - Reverted changes to display decimal.MinValue and decimal.MaxValue - Altered InitializerTests to use constant literals instead of decimal.MinValue and decimal.MaxValue --- ICSharpCode.Decompiler/Tests/InitializerTests.cs | 4 ++-- .../CSharp/OutputVisitor/OutputVisitor.cs | 11 ----------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/ICSharpCode.Decompiler/Tests/InitializerTests.cs b/ICSharpCode.Decompiler/Tests/InitializerTests.cs index 5fcee53b5..80fbe7478 100644 --- a/ICSharpCode.Decompiler/Tests/InitializerTests.cs +++ b/ICSharpCode.Decompiler/Tests/InitializerTests.cs @@ -297,8 +297,8 @@ public class InitializerTests -100m, 0m, 100m, - decimal.MinValue, - decimal.MaxValue, + -79228162514264337593543950335m, + 79228162514264337593543950335m, 0.0000001m }); } diff --git a/NRefactory/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs b/NRefactory/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs index bb1391c25..151cc9b14 100644 --- a/NRefactory/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs +++ b/NRefactory/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs @@ -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) {