Commit 2f032858 authored by Bram Kohlen's avatar Bram Kohlen
Browse files

Fixed nested test

parent 2a33bda9
......@@ -5,6 +5,8 @@ import org.junit.Test;
import java.io.IOException;
import static junit.framework.TestCase.assertEquals;
public class NestedTest extends AbstractModelTest {
@Test
......@@ -13,4 +15,33 @@ public class NestedTest extends AbstractModelTest {
{
System.out.println(printVanillaModel("Nested.m"));
}
@Test
public void testModel() throws IOException
{
String actual = printVanillaModel("Nested.m");
String expected =
"package montimath.vanilla;\n" +
"\n" +
"script Nested\n" +
" Q sum = 1;\n" +
" for i = 1:2:9\n" +
" if i < 2\n" +
" sum -= sum * i;\n" +
" elseif i < 4\n" +
" sum += sum * i;\n" +
" else\n" +
" for j = 1:2:6\n" +
" sum += sum * (i - j);\n" +
" end\n" +
"\n" +
" end\n" +
"\n" +
" end\n" +
"\n" +
"end";
assertEquals(expected, actual);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment