Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraleherbau2011-04-06 14:27:32 +0000
committeraleherbau2011-04-06 14:27:32 +0000
commit56b6dfdffcb437472d72ffbf2c55eb2c5541f4f1 (patch)
tree1fc3e74eb29345416af4d7354993109d645bc720 /python/src/tcf/tests/BasicTests.py
parentd18d3f559a79c345222dffe248d53fef8d1c3931 (diff)
downloadorg.eclipse.tcf-56b6dfdffcb437472d72ffbf2c55eb2c5541f4f1.tar.gz
org.eclipse.tcf-56b6dfdffcb437472d72ffbf2c55eb2c5541f4f1.tar.xz
org.eclipse.tcf-56b6dfdffcb437472d72ffbf2c55eb2c5541f4f1.zip
Implemented Expressions service proxy
Diffstat (limited to 'python/src/tcf/tests/BasicTests.py')
-rw-r--r--python/src/tcf/tests/BasicTests.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/python/src/tcf/tests/BasicTests.py b/python/src/tcf/tests/BasicTests.py
index 692f35df1..acddf6a9f 100644
--- a/python/src/tcf/tests/BasicTests.py
+++ b/python/src/tcf/tests/BasicTests.py
@@ -27,7 +27,11 @@ _suspended = []
def test():
protocol.startEventQueue()
- c = tcf.connect("TCP:127.0.0.1:1534")
+ try:
+ c = tcf.connect("TCP:127.0.0.1:1534")
+ except exceptions.Exception as e:
+ protocol.log(e)
+ sys.exit()
assert c.state == channel.STATE_OPEN
if __TRACE: protocol.invokeLater(c.addTraceListener, TraceListener())
def r2():
@@ -40,6 +44,7 @@ def test():
testBreakpoints(c)
testSymbols(c)
testRegisters(c)
+ testExpressions(c)
testSyncCommands(c)
testEvents(c)
testDataCache(c)
@@ -290,6 +295,17 @@ def testRegisters(c):
protocol.invokeLater(regTest, ctx_id)
lock.wait(5000)
+def testExpressions(c):
+ if not _suspended: return
+ from tcf.services import expressions
+ ctl = sync.CommandControl(c)
+ exprs = ctl.Expressions
+ e = exprs.create(_suspended[0], None, "1+2*(3-4/2)").getE()
+ id = e.get(expressions.PROP_ID)
+ val, cls = exprs.evaluate(id).getE()
+ print e.get(expressions.PROP_EXPRESSION), "=", val
+ exprs.dispose(id)
+
def testSyncCommands(c):
# simplified command execution
ctl = sync.CommandControl(c)

Back to the top