summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormclay2008-11-13 02:02:27 (EST)
committer sefftinge2008-11-13 02:02:27 (EST)
commit78b104dbe24c4291b88da08c0bd7140b162f2863 (patch)
treecc2d1087b5536ba0808b4fcba0e33637560e5aa2
parentb8e68f9789f585175fc7637f49c77ad5dad6e594 (diff)
downloadorg.eclipse.xtext-78b104dbe24c4291b88da08c0bd7140b162f2863.zip
org.eclipse.xtext-78b104dbe24c4291b88da08c0bd7140b162f2863.tar.gz
org.eclipse.xtext-78b104dbe24c4291b88da08c0bd7140b162f2863.tar.bz2
add: keep working on '[UI] Content Assist - Unittests' https://bugs.eclipse.org/bugs/show_bug.cgi?id=253707
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src/org/eclipse/xtext/ui/common/editor/codecompletion/DefaultContentAssistProcessorTest.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/org.eclipse.xtext.ui.common.tests/src/org/eclipse/xtext/ui/common/editor/codecompletion/DefaultContentAssistProcessorTest.java b/tests/org.eclipse.xtext.ui.common.tests/src/org/eclipse/xtext/ui/common/editor/codecompletion/DefaultContentAssistProcessorTest.java
index 3fca9a4..a8a11a1 100644
--- a/tests/org.eclipse.xtext.ui.common.tests/src/org/eclipse/xtext/ui/common/editor/codecompletion/DefaultContentAssistProcessorTest.java
+++ b/tests/org.eclipse.xtext.ui.common.tests/src/org/eclipse/xtext/ui/common/editor/codecompletion/DefaultContentAssistProcessorTest.java
@@ -66,15 +66,16 @@ public class DefaultContentAssistProcessorTest extends AbstractUiTest
public void testComputeCompletionProposalsCount() throws Exception {
Map<String, Integer> model2ExpectedProposalCountMap = new HashMap<String, Integer>();
- model2ExpectedProposalCountMap.put("", 1);
- model2ExpectedProposalCountMap.put("spielplatz ", 2);
- model2ExpectedProposalCountMap.put("spielplatz 1 ", 3);
- model2ExpectedProposalCountMap.put("spielplatz 1 \"JUNIT\" ", 1);
- model2ExpectedProposalCountMap.put("spielplatz 1 \"JUNIT\" { ", 5);
- model2ExpectedProposalCountMap.put("spielplatz 1 \"JUNIT\" { kind ", 1);
- model2ExpectedProposalCountMap.put("spielplatz 1 \"JUNIT\" { kind(k1 0) erwachsener(e1 0) erwachsener(e2 0) familie( f1 ",2);
- model2ExpectedProposalCountMap.put("spielplatz 1 \"JUNIT\" { kind(k1 0) erwachsener(e1 0) erwachsener(e2 0) familie( f1 e1 ",2);
- model2ExpectedProposalCountMap.put("spielplatz 1 \"JUNIT\" { kind(k1 0) erwachsener(e1 0) erwachsener(e2 0) familie( f1 e1 e2 ",1);
+ StringBuilder modelBuilder = new StringBuilder("");
+ model2ExpectedProposalCountMap.put(modelBuilder.toString(), 1);
+ model2ExpectedProposalCountMap.put(modelBuilder.append("spielplatz ").toString(), 2);
+ model2ExpectedProposalCountMap.put(modelBuilder.append("1 ").toString(), 3);
+ model2ExpectedProposalCountMap.put(modelBuilder.append("\"JUNIT\" ").toString(), 1);
+ model2ExpectedProposalCountMap.put(modelBuilder.append("{ ").toString(), 5);
+ model2ExpectedProposalCountMap.put(modelBuilder.append("kind ").toString(), 1);
+ model2ExpectedProposalCountMap.put(modelBuilder.append("(k1 0) erwachsener(e1 0) erwachsener(e2 0) familie( f1 ").toString(),2);
+ model2ExpectedProposalCountMap.put(modelBuilder.append("e1 ").toString(),2);
+ model2ExpectedProposalCountMap.put(modelBuilder.append("e2 ").toString(),1);
for (Iterator<String> iterator = model2ExpectedProposalCountMap.keySet()
.iterator(); iterator.hasNext();) {