Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 59477 Details for
Bug 174879
[1.5][compiler] Optimisation for empty if blocks results in not evaluating the test expression
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression tests
patch_174879_tests.txt (text/plain), 3.64 KB, created by
Olivier Thomann
on 2007-02-21 10:02:17 EST
(
hide
)
Description:
Regression tests
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-02-21 10:02:17 EST
Size:
3.64 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java,v >retrieving revision 1.104 >diff -u -r1.104 AutoBoxingTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java 10 Jan 2007 11:48:40 -0000 1.104 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java 21 Feb 2007 14:59:57 -0000 >@@ -3859,4 +3859,114 @@ > "Zork cannot be resolved to a type\n" + > "----------\n"); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=174879 >+public void test130() { >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " Boolean[] myBool = new Boolean[1];\n" + >+ " void foo() {\n" + >+ " if (this.myBool[0]) {}\n" + >+ " }\n" + >+ " public static void main(String[] args) {\n" + >+ " try {\n" + >+ " new X().foo();\n" + >+ " System.out.println(\"FAILURE\");\n" + >+ " } catch(NullPointerException e) {\n" + >+ " System.out.println(\"SUCCESS\");\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ }, >+ "SUCCESS"); >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=174879 >+public void test131() { >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " Boolean myBool = null;\n" + >+ " void foo() {\n" + >+ " if (myBool) {}\n" + >+ " }\n" + >+ " public static void main(String[] args) {\n" + >+ " try {\n" + >+ " new X().foo();\n" + >+ " System.out.println(\"FAILURE\");\n" + >+ " } catch(NullPointerException e) {\n" + >+ " System.out.println(\"SUCCESS\");\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ }, >+ "SUCCESS"); >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=174879 >+public void test132() { >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " static Boolean myBool = null;\n" + >+ " static void foo() {\n" + >+ " if (myBool) {}\n" + >+ " }\n" + >+ " public static void main(String[] args) {\n" + >+ " try {\n" + >+ " foo();\n" + >+ " System.out.println(\"FAILURE\");\n" + >+ " } catch(NullPointerException e) {\n" + >+ " System.out.println(\"SUCCESS\");\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ }, >+ "SUCCESS"); >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=174879 >+public void test133() { >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " Boolean myBool = null;\n" + >+ " void foo() {\n" + >+ " if (this.myBool) {}\n" + >+ " }\n" + >+ " public static void main(String[] args) {\n" + >+ " try {\n" + >+ " new X().foo();\n" + >+ " System.out.println(\"FAILURE\");\n" + >+ " } catch(NullPointerException e) {\n" + >+ " System.out.println(\"SUCCESS\");\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ }, >+ "SUCCESS"); >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=174879 >+public void test134() { >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " static Boolean MyBool = null;\n" + >+ " static void foo() {\n" + >+ " if (X.MyBool) {}\n" + >+ " }\n" + >+ " public static void main(String[] args) {\n" + >+ " try {\n" + >+ " foo();\n" + >+ " System.out.println(\"FAILURE\");\n" + >+ " } catch(NullPointerException e) {\n" + >+ " System.out.println(\"SUCCESS\");\n" + >+ " }\n" + >+ " }\n" + >+ "}", >+ }, >+ "SUCCESS"); >+} > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 174879
: 59477 |
59482