diff options
author | Sebastien Pouliot <sebastien@ximian.com> | 2008-02-16 19:27:04 +0300 |
---|---|---|
committer | Sebastien Pouliot <sebastien@ximian.com> | 2008-02-16 19:27:04 +0300 |
commit | b4eeb9407b2ee139b463a5db22b1dad83537f400 (patch) | |
tree | 591c669332ec0e3dc8cc349b5703367206a6e1d9 /gendarme/rules | |
parent | 05d89e8164b69310ce7e24c5784e24defa33cc5b (diff) |
FloatComparisonRuleTest.cs: Fix test not to depend on compiler.
svn path=/trunk/mono-tools/; revision=95900
Diffstat (limited to 'gendarme/rules')
-rw-r--r-- | gendarme/rules/Gendarme.Rules.Correctness/Test/ChangeLog | 3 | ||||
-rw-r--r-- | gendarme/rules/Gendarme.Rules.Correctness/Test/FloatComparisonRuleTest.cs | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/gendarme/rules/Gendarme.Rules.Correctness/Test/ChangeLog b/gendarme/rules/Gendarme.Rules.Correctness/Test/ChangeLog index 737f596e..3d6e37dd 100644 --- a/gendarme/rules/Gendarme.Rules.Correctness/Test/ChangeLog +++ b/gendarme/rules/Gendarme.Rules.Correctness/Test/ChangeLog @@ -1,6 +1,7 @@ -2008-02-16 Sebastien Pouliot <sebastien@ximian.com> +2008-02-16 Sebastien Pouliot <sebastien@ximian.com> * DontCompareWithNaNTest.cs: Fix name change. + * FloatComparisonRuleTest.cs: Fix test not to depend on compiler. 2008-02-15 Sebastien Pouliot <sebastien@ximian.com> diff --git a/gendarme/rules/Gendarme.Rules.Correctness/Test/FloatComparisonRuleTest.cs b/gendarme/rules/Gendarme.Rules.Correctness/Test/FloatComparisonRuleTest.cs index c32d6ffe..3248cdc9 100644 --- a/gendarme/rules/Gendarme.Rules.Correctness/Test/FloatComparisonRuleTest.cs +++ b/gendarme/rules/Gendarme.Rules.Correctness/Test/FloatComparisonRuleTest.cs @@ -347,11 +347,11 @@ namespace Test.Rules.Correctness { { MethodDefinition method = GetTest ("Float", "Local"); Assert.AreEqual (RuleResult.Failure, runner.CheckMethod (method), "RuleResult-Float"); - Assert.AreEqual (4, runner.Defects.Count, "Count-Float"); + Assert.IsTrue (runner.Defects.Count >= 2, "Count-Float"); method = GetTest ("Double", "Local"); Assert.AreEqual (RuleResult.Failure, runner.CheckMethod (method), "RuleResult-Double"); - Assert.AreEqual (4, runner.Defects.Count, "Count-Double"); + Assert.IsTrue (runner.Defects.Count >= 2, "Count-Double"); } [Test] @@ -359,11 +359,11 @@ namespace Test.Rules.Correctness { { MethodDefinition method = GetTest ("Float", "LocalAbove4"); Assert.AreEqual (RuleResult.Failure, runner.CheckMethod (method), "RuleResult-Float"); - Assert.AreEqual (4, runner.Defects.Count, "Count-Float"); + Assert.IsTrue (runner.Defects.Count >= 2, "Count-Float"); method = GetTest ("Double", "LocalAbove4"); Assert.AreEqual (RuleResult.Failure, runner.CheckMethod (method), "RuleResult-Double"); - Assert.AreEqual (4, runner.Defects.Count, "Count-Double"); + Assert.IsTrue (runner.Defects.Count >= 2, "Count-Double"); } [Test] |