[java] Remove old tests for BadComparison

This commit is contained in:
Andreas Dangel
2021-06-10 17:04:25 +02:00
parent f00b63f8fd
commit 9b187ffc03
2 changed files with 0 additions and 47 deletions

View File

@@ -1,11 +0,0 @@
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.errorprone;
import net.sourceforge.pmd.testframework.PmdRuleTst;
public class BadComparisonTest extends PmdRuleTst {
// no additional unit tests
}

View File

@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<test-data
xmlns="http://pmd.sourceforge.net/rule-tests"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/rule-tests http://pmd.sourceforge.net/rule-tests_1_0_0.xsd">
<test-code>
<description>comparison to Double.NaN</description>
<expected-problems>1</expected-problems>
<code><![CDATA[
public class Foo {
boolean x = (y == Double.NaN);
}
]]></code>
</test-code>
<test-code>
<description>ok equality comparison</description>
<expected-problems>0</expected-problems>
<code><![CDATA[
public class Foo {
boolean x = (y == z);
}
]]></code>
</test-code>
<test-code>
<description>comparison to Float.NaN</description>
<expected-problems>1</expected-problems>
<code><![CDATA[
public class Foo {
boolean x = (y == Float.NaN);
}
]]></code>
</test-code>
</test-data>