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 168624 Details for
Bug 312989
Accepts illegal method-local classes if hidden by generics parameters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Add regression tests
patch_312989.txt (text/plain), 3.32 KB, created by
Olivier Thomann
on 2010-05-14 19:52:42 EDT
(
hide
)
Description:
Add regression tests
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2010-05-14 19:52:42 EDT
Size:
3.32 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/InnerClass15Test.java >=================================================================== >RCS file: src/org/eclipse/jdt/core/tests/compiler/regression/InnerClass15Test.java >diff -N src/org/eclipse/jdt/core/tests/compiler/regression/InnerClass15Test.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/InnerClass15Test.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,69 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.jdt.core.tests.compiler.regression; >+ >+import java.util.Map; >+ >+import junit.framework.Test; >+ >+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; >+ >+public class InnerClass15Test extends AbstractRegressionTest { >+public InnerClass15Test(String name) { >+ super(name); >+} >+static { >+// TESTS_NUMBERS = new int[] { 2 }; >+} >+public static Test suite() { >+ return buildMinimalComplianceTestSuite(testClass(), F_1_5); >+} >+protected Map getCompilerOptions() { >+ Map options = super.getCompilerOptions(); >+ options.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.IGNORE); >+ return options; >+} >+public void test001() { >+ this.runNegativeTest(new String[] { >+ "X.java", >+ "class X {\n" + >+ " <X> void foo() {\n" + >+ " class X {}\n" + >+ " }\n" + >+ "}", >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 3)\n" + >+ " class X {}\n" + >+ " ^\n" + >+ "The nested type X cannot hide an enclosing type\n" + >+ "----------\n"); >+} >+public void test002() { >+ this.runNegativeTest(new String[] { >+ "X.java", >+ "class X<X> {\n" + >+ " void foo() {\n" + >+ " class X {}\n" + >+ " }\n" + >+ "}", >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 3)\n" + >+ " class X {}\n" + >+ " ^\n" + >+ "The nested type X cannot hide an enclosing type\n" + >+ "----------\n"); >+} >+public static Class testClass() { >+ return InnerClass15Test.class; >+} >+} >Index: src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java,v >retrieving revision 1.85 >diff -u -r1.85 TestAll.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java 11 May 2010 18:53:50 -0000 1.85 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java 14 May 2010 23:52:07 -0000 >@@ -94,6 +94,7 @@ > since_1_5.add(Deprecated15Test.class); > since_1_5.add(InnerEmulationTest_1_5.class); > since_1_5.add(AssignmentTest_1_5.class); >+ since_1_5.add(InnerClass15Test.class); > > // Tests to run when compliance is greater than 1.5 > ArrayList since_1_6 = new ArrayList();
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 312989
:
168624
|
168713
|
168727