summaryrefslogtreecommitdiff
path: root/demoscript/Freeze/bench.py
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2007-08-15 13:59:55 -0230
committerDwayne Boone <dwayne@zeroc.com>2007-08-15 13:59:55 -0230
commit1d265d0027c43825a0dd9567589758713a27452c (patch)
tree207e11aba123ed504311ba5b988b79d151852704 /demoscript/Freeze/bench.py
parentAdded missing file (diff)
downloadice-1d265d0027c43825a0dd9567589758713a27452c.tar.bz2
ice-1d265d0027c43825a0dd9567589758713a27452c.tar.xz
ice-1d265d0027c43825a0dd9567589758713a27452c.zip
Added expect scripts
Diffstat (limited to 'demoscript/Freeze/bench.py')
-rwxr-xr-xdemoscript/Freeze/bench.py68
1 files changed, 68 insertions, 0 deletions
diff --git a/demoscript/Freeze/bench.py b/demoscript/Freeze/bench.py
new file mode 100755
index 00000000000..67934186d87
--- /dev/null
+++ b/demoscript/Freeze/bench.py
@@ -0,0 +1,68 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import pexpect, sys
+
+def run(client, isJava=False):
+ if isJava:
+ client.expect('IntIntMap \\(Collections API\\)')
+ print "IntIntMap (Collections API):"
+ client.expect('IntIntMap \\(Fast API\\)', timeout=200)
+ print "%s " % (client.before)
+
+ print "IntIntMap (Fast API):"
+ client.expect('IntIntMap with index \\(Collections API\\)', timeout=200)
+ print "%s " % (client.before)
+
+ print "IntIntMap with index (Collections API):"
+ client.expect('IntIntMap with index \\(Fast API\\)', timeout=200)
+ print "%s " % (client.before)
+
+ print "IntIntMap with index (Fast API):"
+ client.expect('Struct1Struct2Map', timeout=200)
+ print "%s " % (client.before)
+ else:
+ client.expect('IntIntMap')
+ print "IntIntMap:"
+ client.expect('IntIntMap with index', timeout=200)
+ print "%s " % (client.before)
+
+ print "IntIntMap with index:"
+ client.expect('Struct1Struct2Map', timeout=200)
+ print "%s " % (client.before)
+
+ print "Struct1Struct2Map:"
+ client.expect('Struct1Struct2Map with index', timeout=200)
+ print "%s " % (client.before)
+
+ print "Struct1Struct2Map with index:"
+ client.expect('Struct1Class1Map', timeout=200)
+ print "%s " % (client.before)
+
+ print "Struct1Class1Map:"
+ client.expect('Struct1Class1Map with index', timeout=200)
+ print "%s " % (client.before)
+
+ print "Struct1Class1Map with index:"
+ client.expect('Struct1ObjectMap', timeout=200)
+ print "%s " % (client.before)
+
+ print "Struct1ObjectMap:"
+ client.expect('IntIntMap \\(read test\\)', timeout=200)
+ print "%s " % (client.before)
+
+ print "IntIntMap (read test):"
+ client.expect('IntIntMap with index \\(read test\\)', timeout=200)
+ print "%s " % (client.before)
+
+ print "IntIntMap with index (read test):"
+ client.expect(pexpect.EOF, timeout=200)
+ assert client.wait() == 0
+ print "%s " % (client.before)