fefrei / prog2tests

Automatically exported from code.google.com/p/prog2tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extensive loop test

GoogleCodeExporter opened this issue · comments

Hi, 
here a new test for loops. It tests while-loops, do-while-loops, break, 
continue and lots of combinations of them. In case of errors i tried to give 
the user feedback where they have to look for this error, including source and 
asm output (console). 

In the TestBaseMarkus.java there are some functions that might be interesting 
for you. Especially the CTS function, which converts a comment into a string. 
This way you can easily write codes over multiple lines and read clearly in 
test file's source. 

Hope you like it
Markus

PS: additionally i had a test for Bonus1, but you already have one. Mine had 
some more lines to check overflows: 
assertResult("int f(){return --2147483648;}", -(-2147483648)); // = -2147483648
assertResult("int f(){return (-2147483648) - 1;}", 2147483647);

Original issue reported on code.google.com by rothe...@gmx.de on 18 Jul 2012 at 7:20

Attachments:

Replaced by Issue 54.

Original comment by felix@familie-freiberger.net on 20 Jul 2012 at 5:54

  • Changed state: Invalid