changeset 40:6a8ee2eb7cdd

Updated unittest
author Sigurd Meldgaard <stm@daimi.au.dk>
date Tue, 26 May 2009 12:44:34 +0200
parents 95c5e9e0c5f8
children 36c1d4c0cb34
files pysmcl/test/unit/test_secret_ifs.py
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/test/unit/test_secret_ifs.py	Tue May 26 11:38:06 2009 +0200
+++ b/pysmcl/test/unit/test_secret_ifs.py	Tue May 26 12:44:34 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])