Lines 10-16
Link Here
|
10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
11 |
package org.eclipse.jdt.core.tests.model; |
11 |
package org.eclipse.jdt.core.tests.model; |
12 |
|
12 |
|
|
|
13 |
import java.util.HashMap; |
13 |
import java.util.Hashtable; |
14 |
import java.util.Hashtable; |
|
|
15 |
import java.util.Map; |
14 |
|
16 |
|
15 |
import junit.framework.Test; |
17 |
import junit.framework.Test; |
16 |
|
18 |
|
Lines 672-675
Link Here
|
672 |
"setIsSomething", //$NON-NLS-1$ |
674 |
"setIsSomething", //$NON-NLS-1$ |
673 |
new String(suggestion)); |
675 |
new String(suggestion)); |
674 |
} |
676 |
} |
|
|
677 |
/* |
678 |
* bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=133562 |
679 |
*/ |
680 |
public void testSuggestLocalName001() { |
681 |
Map options = this.project.getOptions(true); |
682 |
try { |
683 |
Map newOptions = new HashMap(options); |
684 |
newOptions.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_5); |
685 |
newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_5); |
686 |
newOptions.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5); |
687 |
this.project.setOptions(newOptions); |
688 |
|
689 |
String[] suggestions = NamingConventions.suggestLocalVariableNames( |
690 |
project, |
691 |
"",//$NON-NLS-1$ |
692 |
"Enum",//$NON-NLS-1$ |
693 |
0, |
694 |
new String[]{"o"}); |
695 |
|
696 |
assertEquals( |
697 |
"enum1", //$NON-NLS-1$ |
698 |
toString(suggestions)); |
699 |
} finally { |
700 |
this.project.setOptions(options); |
701 |
} |
702 |
} |
675 |
} |
703 |
} |