changeset 139:10d98908dee7

Test: made a test more meaningful
author Sigurd Meldgaard <stm@daimi.au.dk>
date Mon, 09 Nov 2009 10:09:35 +0100
parents bcde6c7bf06d
children eb3a88a91f74
files pysmcl/test/unit/test_secret_annotator.py
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/test/unit/test_secret_annotator.py	Wed Nov 04 14:54:05 2009 +0100
+++ b/pysmcl/test/unit/test_secret_annotator.py	Mon Nov 09 10:09:35 2009 +0100
@@ -11,10 +11,15 @@
 class SecretAnnotatorTest(unittest.TestCase):
 
 
-    def test_range_one_range(self):
-        prog = parse("def f(x):\n\tx\n")
+    def test1(self):
+        prog = parse("""
+def f(x):
+    print(24)
+    y = get()
+    x = 2
+""")
         secret_analysis(prog.body[0])
-        self.assertEquals(prog.body[0].body[0].out_values["secret"], set(['x']))
+        self.assertEquals(prog.body[0].body[-1].out_values["secret"], set(['y']))
 
 if __name__ == '__main__':
     unittest.main()