changeset 43:36c1d4c0cb34

Merged with Sigurd.
author Janus Dam Nielsen <janus.nielsen@alexandra.dk>
date Tue, 26 May 2009 14:39:22 +0200
parents 43a8f007edcb (current diff) 6a8ee2eb7cdd (diff)
children b852eb00a629
files
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/test/unit/test_secret_ifs.py	Tue May 26 14:39:07 2009 +0200
+++ b/pysmcl/test/unit/test_secret_ifs.py	Tue May 26 14:39:22 2009 +0200
@@ -18,8 +18,16 @@
 """def f(x):
     cond0 = x
     a = cond0 * 1 + (1 - cond0) * 2
+    x = cond0 * a + (1 - cond0) * x
 """
-        prog = parse("def f(x):\n\tif(x):\n\t\ta=1\n\telse:\n\t\ta=2")
+        prog = parse(
+"""def f(x):
+    if(x):
+        a=1
+        x=a
+    else:
+        a=2
+""")
         trans = TransformIfs()
         init_statements(prog)
         secret_analysis(prog.body[0])