forked from phoedos/pmd
Cleanup: Moving testcase for bug '1843273 : False - on SimplifyBooleanReturns' to the appropriate file.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x@6858 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -65,5 +65,32 @@ public class Foo {
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
|
||||
</test-code>
|
||||
|
||||
<test-code regressionTest="false">
|
||||
<description><![CDATA[
|
||||
Bug [1843273] False - SimplifyBooleanReturns
|
||||
]]></description>
|
||||
<expected-problems>1</expected-problems>
|
||||
<code><![CDATA[
|
||||
public class Bug1843273
|
||||
{
|
||||
public boolean isTrue(Boolean value)
|
||||
{
|
||||
boolean result = true;
|
||||
|
||||
if (value.booleanValue())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ! result;
|
||||
}
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
</test-data>
|
||||
|
@ -78,32 +78,8 @@ public class Foo {
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
<test-code>
|
||||
<description><![CDATA[
|
||||
Bug [1843273] False -
|
||||
]]></description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
public class Bug1843273
|
||||
{
|
||||
public boolean isTrue(Boolean value)
|
||||
{
|
||||
boolean result = true;
|
||||
|
||||
if (value.booleanValue())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ! result;
|
||||
}
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
<test-code regressionTest="false">
|
||||
|
||||
<test-code>
|
||||
<description><![CDATA[
|
||||
Bug 2317099 : False + in SimplifyConditional
|
||||
]]></description>
|
||||
|
Reference in New Issue
Block a user