package boa.test.compiler;

import java.io.IOException;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class TestCodegen extends BaseTest {
	final private static String rootDir = "test/codegen/";


	@Test
	public void curry() throws IOException {
		codegen(load(rootDir + "curry.boa"));
	}
}

@@ -40,236 +40,840 @@
 .io.
-IOException;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.JUnit4;%0A%0A@RunWith(JUnit4.class)%0Apublic class TestCodegen extends BaseTest %7B%0A%09final private static String rootDir = %22test/codegen/%22;%0A%0A
+File;%0Aimport java.io.IOException;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.Parameterized;%0Aimport org.junit.runners.Parameterized.Parameters;%0A%0A@RunWith(Parameterized.class)%0Apublic class TestCodegen extends BaseTest %7B%0A%09final private static String rootDir = %22test/codegen/%22;%0A%0A%09@Parameters(name = %22%7B0%7D%22)%0A%09public static List%3CString%5B%5D%3E data() %7B%0A%09%09final List%3CString%5B%5D%3E files = new ArrayList%3CString%5B%5D%3E();%0A%09%09for (final File f : new File(rootDir).listFiles())%0A%09%09%09if (!f.isDirectory() && f.getName().endsWith(%22.boa%22))%0A%09%09%09%09files.add(new String%5B%5D %7B f.getPath(), null %7D);%0A%09%09return files;%0A%09%7D%0A%0A%09private String fileName;%0A%09public TestCodegen(final String fileName, final String ignored) %7B%0A%09%09this.fileName = fileName;%0A%09%7D%0A%0A%0A%09// test a bunch of known good files
 %0A%09@T
@@ -889,21 +889,25 @@
 ic void 
-curry
+knownGood
 () throw
@@ -941,29 +941,16 @@
 oad(
-rootDir + %22curry.boa%22
+fileName
 ));%0A

refactor codegen tests to just run all files in the test dir