changeset 87:015b29ec71fd

Added test for result.
author Janus Dam Nielsen <janus.nielsen@alexandra.dk>
date Fri, 29 May 2009 11:57:13 +0200
parents 154a31dbff5c
children 0fb9ae8d823d
files pysmcl/test/unit/test_rangeanalysis.py
diffstat 1 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/test/unit/test_rangeanalysis.py	Fri May 29 11:56:48 2009 +0200
+++ b/pysmcl/test/unit/test_rangeanalysis.py	Fri May 29 11:57:13 2009 +0200
@@ -278,17 +278,17 @@
         r = prog.body[0].body[-1].out_values["range"]
         self.assertEquals(r, {'x': (0, p)})
 
-#     def test_range_result(self):
-#         p = 7
-#         prog = parse(
-# """
-# def f(x):
-#     return x
-# """)
-#         range_analysis = RangeAnalysis(p)
-#         range_analysis.apply(prog.body[0])
-#         r = prog.body[0].body[-1].out_values["range"]
-#         self.assertEquals(r, {'x': (0, Bottom())})
+    def test_range_result(self):
+        p = 7
+        prog = parse(
+"""
+def f(x):
+    return x
+""")
+        range_analysis = RangeAnalysis(p)
+        range_analysis.apply(prog.body[0])
+        r = prog.body[0].body[-1].out_values["range"]
+        self.assertEquals(r, {'x': (0, 7)})
 
 #     def test_range_multiple_assign_and_tuples(self):
 #         p = 7