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 103709 Details for
Bug 235775
[eval] Code snippet evaluation doesn't work for constructor invocation with type arguments
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
DebugEvaluationTest.test065()
test065.txt (text/plain), 2.39 KB, created by
David Audel
on 2008-06-05 04:56:47 EDT
(
hide
)
Description:
DebugEvaluationTest.test065()
Filename:
MIME Type:
Creator:
David Audel
Created:
2008-06-05 04:56:47 EDT
Size:
2.39 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/eval/DebugEvaluationTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/DebugEvaluationTest.java,v >retrieving revision 1.37 >diff -u -r1.37 DebugEvaluationTest.java >--- src/org/eclipse/jdt/core/tests/eval/DebugEvaluationTest.java 27 May 2008 23:54:01 -0000 1.37 >+++ src/org/eclipse/jdt/core/tests/eval/DebugEvaluationTest.java 5 Jun 2008 08:48:12 -0000 >@@ -3868,6 +3868,56 @@ > removeTempClass("A62"); > } > } >+public void testONLY_065() { >+ if (this.complianceLevel < ClassFileConstants.JDK1_5) return; >+ try { >+ String sourceA65 = >+ "public class A65<T> {\n" >+ + "\tprivate int i;\n" >+ + "\tpublic <U>A65() {;\n" >+ + "\t}\n" >+ + "\tprivate <U>A65(int i) {;\n" >+ + "\t\tthis.i = i;\n" >+ + "\t}\n" >+ + "\tpublic void bar() {\n" >+ + "\t}\n" >+ + "}"; >+ compileAndDeploy15(sourceA65, "A65"); >+ >+ String userCode = "new <Object>A65<Object>().bar();"; >+ JDIStackFrame stackFrame = >+ new JDIStackFrame(this.jdiVM, this, userCode, "A65", "bar", -1); >+ >+ DebugRequestor requestor = new DebugRequestor(); >+ char[] snippet = "return new <Object>A65<Object>(3).i;".toCharArray(); >+ try { >+ context.evaluate( >+ snippet, >+ stackFrame.localVariableTypeNames(), >+ stackFrame.localVariableNames(), >+ stackFrame.localVariableModifiers(), >+ stackFrame.declaringTypeName(), >+ stackFrame.isStatic(), >+ stackFrame.isConstructorCall(), >+ getEnv(), >+ getCompilerOptions(), >+ requestor, >+ getProblemFactory()); >+ } catch (InstallException e) { >+ assertTrue("No targetException " + e.getMessage(), false); >+ } >+ assertTrue( >+ "Should get one result but got " + (requestor.resultIndex + 1), >+ requestor.resultIndex == 0); >+ EvaluationResult result = requestor.results[0]; >+ assertTrue("Code snippet should not have problems", !result.hasProblems()); >+ assertTrue("Result should have a value", result.hasValue()); >+ assertEquals("Value", "3".toCharArray(), result.getValueDisplayString()); >+ assertEquals("Type", "int".toCharArray(), result.getValueTypeName()); >+ } finally { >+ removeTempClass("A65"); >+ } >+} > /** > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=178861 > */
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 235775
: 103709