diff options
author | eutarass | 2010-09-11 00:19:17 +0000 |
---|---|---|
committer | eutarass | 2010-09-11 00:19:17 +0000 |
commit | 41ab127907185b5d9756ccc80a9342c8c7f957ab (patch) | |
tree | fca1f3a60fb2dce98a7760a91626ebaf2ee7112b /plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf | |
parent | b6fb6a135a4effb6cb3bf5f7d38ee519053c0790 (diff) | |
download | org.eclipse.tcf-41ab127907185b5d9756ccc80a9342c8c7f957ab.tar.gz org.eclipse.tcf-41ab127907185b5d9756ccc80a9342c8c7f957ab.tar.xz org.eclipse.tcf-41ab127907185b5d9756ccc80a9342c8c7f957ab.zip |
TCF Debugger: added diagnostic test for Expressions.dispose command
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf')
-rw-r--r-- | plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java index 0964b7f7a..66d6728c1 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java @@ -13,7 +13,9 @@ package org.eclipse.tm.internal.tcf.debug.tests; import java.math.BigInteger; import java.util.Collection; import java.util.HashMap; +import java.util.HashSet; import java.util.Map; +import java.util.Set; import org.eclipse.tm.tcf.protocol.IChannel; import org.eclipse.tm.tcf.protocol.IErrorReport; @@ -56,6 +58,7 @@ class TestExpressions implements ITCFTest, private final Map<String,IExpressions.Value> expr_val = new HashMap<String,IExpressions.Value>(); private final Map<String,ISymbols.Symbol> expr_sym = new HashMap<String,ISymbols.Symbol>(); private final Map<String,String[]> expr_chld = new HashMap<String,String[]>(); + private final Set<String> expr_to_dispose = new HashSet<String>(); private static String[] test_expressions = { "func2_local1", @@ -386,6 +389,7 @@ class TestExpressions implements ITCFTest, exit(error); } else { + expr_to_dispose.add(ctx.getID()); expr_ctx.put(txt, ctx); runTest(); } @@ -475,6 +479,20 @@ class TestExpressions implements ITCFTest, } } } + for (final String id : expr_to_dispose) { + expr.dispose(id, new IExpressions.DoneDispose() { + public void doneDispose(IToken token, Exception error) { + if (error != null) { + exit(error); + } + else { + expr_to_dispose.remove(id); + runTest(); + } + } + }); + return; + } test_done = true; diag.cancelTest(test_ctx_id, new IDiagnostics.DoneCancelTest() { public void doneCancelTest(IToken token, Throwable error) { |