changeset 350:bc3baf6832f4

proof_burden_test: Added another test case
author Sigurd Meldgaard <stm@daimi.au.dk>
date Tue, 20 Jul 2010 11:00:37 +0200
parents b55032f81f15
children 9cafe55fd39a
files pysmcl/test/unit/test_proof_burden.py
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/test/unit/test_proof_burden.py	Mon Jul 19 16:37:07 2010 +0200
+++ b/pysmcl/test/unit/test_proof_burden.py	Tue Jul 20 11:00:37 2010 +0200
@@ -72,3 +72,21 @@
  From:
 """
         self.assertEquals(r, expected)
+
+    def test_if_input(self):
+        r = do_proof_burden(\
+"""def f():
+    x = input("x", 1, 0, 1)
+    y = output(x)
+    if(y):
+        g = input("d", 1, 0, 1)
+    else:
+        pass
+    result(y)
+""")
+        expected = """For the function: f
+ Show that you can compute:
+  The value of x in line 3
+ From:
+"""
+        self.assertEquals(r, expected)