# HG changeset patch # User Windel Bouwman # Date 1395412038 -3600 # Node ID 72a3b646d54302e5df8a2dd0eb358e7b4f32c9e5 # Parent fc1b89b0989645a152f75a33f79462e6231a10ef Added if statement sample diff -r fc1b89b09896 -r 72a3b646d543 test/testsamples.py --- a/test/testsamples.py Fri Mar 21 14:32:54 2014 +0100 +++ b/test/testsamples.py Fri Mar 21 15:27:18 2014 +0100 @@ -42,6 +42,27 @@ res = "".join("A = 0x{0:08X}\n".format(a) for a in range(10)) self.do(snippet, res) + def testIfStatement(self): + snippet = """ + module sample; + import io; + function void start() + { + var int i; + i = 13; + if (i*7 < 100) + { + io.print("Wow"); + } + else + { + io.print("Outch"); + } + } + """ + res = "Wow" + self.do(snippet, res) + def testParameterPassing4(self): snippet = """ module sample;