diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-13 10:19:51 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-20 10:35:53 +0200 |
commit | 60f152caeee38579433a31dd3a98e91dc3d23ff6 (patch) | |
tree | 15ba69f938e09bb173ca7de2e1b21b62e740ea40 /codemaker | |
parent | 2922a967a1da5f9c0a07b5390906307d0ae6fe48 (diff) |
java: avoid unnecessary comparisons in boolean expressions
i.e. stuff like "x == true"
Change-Id: Ib82a4a30e736df392405332fa197b588482cffcf
Diffstat (limited to 'codemaker')
-rw-r--r-- | codemaker/test/javamaker/Test.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/codemaker/test/javamaker/Test.java b/codemaker/test/javamaker/Test.java index cc95099ecf21..2c35e647e2b0 100644 --- a/codemaker/test/javamaker/Test.java +++ b/codemaker/test/javamaker/Test.java @@ -126,7 +126,7 @@ public final class Test extends ComplexTestCase { public void testEmptyStruct2() { Struct2 s = new Struct2(); - assure(s.p1 == false); + assure(!s.p1); assure(s.p2 == 0); assure(s.p3 == 0); assure(s.p4 == 0); @@ -144,7 +144,7 @@ public final class Test extends ComplexTestCase { assure(s.p16.member1 == 0); assure(s.p17 == null); assure(s.p18 == null); - assure(s.t1 == false); + assure(!s.t1); assure(s.t2 == 0); assure(s.t3 == 0); assure(s.t4 == 0); @@ -242,7 +242,7 @@ public final class Test extends ComplexTestCase { new char[0][], new String[0][], new Type[0][], new Object[0][], new Enum2[0][], new Struct1[0][], new Object[0][], new XNamingService[0][]); - assure(s.p1 == true); + assure(s.p1); assure(s.p2 == 1); assure(s.p3 == 2); assure(s.p4 == 3); @@ -260,7 +260,7 @@ public final class Test extends ComplexTestCase { assure(s.p16.member1 == 1); assure(s.p17 == null); assure(s.p18 == null); - assure(s.t1 == false); + assure(!s.t1); assure(s.t2 == 0); assure(s.t3 == 0); assure(s.t4 == 0); @@ -279,8 +279,8 @@ public final class Test extends ComplexTestCase { assure(s.t17 == null); assure(s.t18 == null); assure(s.a1.length == 2); - assure(s.a1[0] == false); - assure(s.a1[1] == true); + assure(!s.a1[0]); + assure(s.a1[1]); assure(s.a2.length == 2); assure(s.a2[0] == 1); assure(s.a2[1] == 2); |