Mercurial > lcfOS
diff test/testsamples.py @ 372:68841f9ab96c
Added yet another test snippet
author | Windel Bouwman |
---|---|
date | Fri, 21 Mar 2014 12:33:30 +0100 |
parents | 39bf68bf1891 |
children | 72a3b646d543 |
line wrap: on
line diff
--- a/test/testsamples.py Fri Mar 21 12:01:19 2014 +0100 +++ b/test/testsamples.py Fri Mar 21 12:33:30 2014 +0100 @@ -42,6 +42,28 @@ res = "".join("A = 0x{0:08X}\n".format(a) for a in range(10)) self.do(snippet, res) + def testParameterPassing4(self): + snippet = """ + module sample; + import io; + function void dump(int a, int b, int c, int d) + { + io.print2("a=", a); + io.print2("b=", b); + io.print2("c=", c); + io.print2("d=", d); + } + function void start() + { + dump(4,55,66,0x1337); + } + """ + res = "a=0x{0:08X}\n".format(4) + res += "b=0x{0:08X}\n".format(55) + res += "c=0x{0:08X}\n".format(66) + res += "d=0x{0:08X}\n".format(0x1337) + self.do(snippet, res) + def testGlobalVariable(self): snippet = """ module sample;