@@ -0,0 +1,1907 @@
+package magic.lang;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Collection;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.Parameterized;%0Aimport org.junit.runners.Parameterized.Parameters;%0A%0Aimport magic.Type;%0Aimport magic.ast.Constant;%0Aimport magic.ast.Do;%0Aimport magic.ast.Dot;%0Aimport magic.ast.If;%0Aimport magic.ast.Lambda;%0Aimport magic.ast.Let;%0Aimport magic.ast.Lookup;%0Aimport magic.ast.Node;%0Aimport magic.ast.Vector;%0Aimport magic.data.APersistentSet;%0Aimport magic.data.Keyword;%0Aimport magic.data.Symbol;%0Aimport magic.data.Vectors;%0A%0A@RunWith(Parameterized.class)%0Apublic class TestNodesParam %7B%0A%09@Parameters(name = %22%7B0%7D%22)%0A    public static Collection%3CObject%5B%5D%3E data() %7B%0A        ArrayList%3CObject%5B%5D%3E data=new ArrayList%3C%3E();%0A        for (Node%3C?%3E t:exampleNodes) %7B%0A        %09data.add(new Object%5B%5D %7Bt%7D);%0A        %7D%0A        return data;%0A    %7D%0A    %0A%09@SuppressWarnings(%22unchecked%22)%0A%09static Node%3C?%3E%5B%5D exampleNodes=new Node%3C?%3E%5B%5D %7B%0A%09%09Constant.create(1),%0A%09%09Constant.create(null),%0A%09%09Vector.create(Constant.create(1)),%0A%09%09Do.create(Constant.create(%22foo%22)),%0A%09%09Let.create(new Symbol%5B%5D%7BSymbol.create(%22a%22)%7D,new Constant%5B%5D%7BConstant.create(3.0)%7D,Lookup.create(%22a%22)),%0A%09%09Lambda.create(Vectors.of(Symbol.create(%22a%22)), Constant.create(Keyword.create(%22foo%22))),%0A%09%09If.createIf(Constant.create(true), Constant.create(1), Constant.create(%22foo%22)),%0A%09%09Dot.create(Constant.create(%22bar%22), Symbol.create(%22length%22), new Node%5B0%5D)%0A%09%09%0A%09%7D;%0A%09%0A%09private Node%3C?%3E node;%0A%09%0A    public TestNodesParam(Object node) %7B%0A        this.node=(Node%3C?%3E) node;%0A    %7D%0A%09%0A%09@Test %0A%09public void testEval() %7B%0A%09%09Context c=Context.EMPTY;%0A%09%09APersistentSet%3CSymbol%3E deps = node.getDependencies();%0A%09%09Type type=node.getType();%0A%09%09Object v=node.compute(c);%0A%09%09assertNotNull(deps);%0A%09%09assertNull(node.getSourceInfo());%0A%09%09// System.out.println(node + %22 = %22 +v +%22 : %22+type);%0A%09%09assertTrue(type.checkInstance(v));%0A%09%7D%0A%7D%0A

Add tests