list.clear(); list.add(factory.parse("1")); list.add(factory.parse("[]")); result = factory.make("[<term>,<list>]", list); System.out.println("\tresult = " + result); test(((ATermList)result).getFirst() == factory.parse("1"), "make-1a"); test(((ATermList)result).getLength() == 1,"make-1b");
  protected  void testPatternMake() {    ATerm[] T = new ATerm[10];    List list = new ArrayList();    ATerm result;      /*    T[0] = factory.makeInt(1);    T[1] = factory.makeInt(2);    T[2] = factory.makeInt(3);    T[3] = factory.makeAppl(factory.makeAFun("a",0,false));    T[4] = factory.makeAppl(factory.makeAFun("b",0,false));    T[5] = factory.makeAppl(factory.makeAFun("c",0,false));    T[6] = factory.parse("f(a,b,c)");    T[7] = factory.parse("[1,2,3]");    T[8] = factory.parse("f(1,2,3)");      */    list.clear();     result = factory.make("23", list);    System.out.println("\tresult = " + result);    list.clear();     result = factory.make("3.14", list);    System.out.println("\tresult = " + result);    list.clear();     result = factory.make("[1,2,3]", list);    System.out.println("\tresult = " + result);        list.clear();     result = factory.make("GL(\"toto\")", list);/*    result = factory.make("GL(    "{\n  System.out.println(\"%{\\n\" + decapString(vDeclGL) + \"\\n%}\"); \n  prettyPrintList(vDeclList); \n  prettyPrintList(vRuleList); \n  System.out.println(\"%%\\n\" + decapString(vMainGL));\n  return ;\n}"*/    System.out.println("\tresult = " + result);    list.clear(); list.add(new Integer(1));    result = factory.make("<int>", list);    System.out.println("\tresult = " + result);    list.clear(); list.add(new Double(3.14));    result = factory.make("<real>", list);    System.out.println("\tresult = " + result);    list.clear(); list.add(factory.parse("f(a,b,c)"));    result = factory.make("<term>", list);    System.out.println("\tresult = " + result);        list.clear();    list.add(factory.parse("f(a,b,c)"));    list.add(new Integer(3));    list.add(factory.parse("<abc>"));    result = factory.make("[<term>,2,<int>,3.14,<placeholder>]", list);    System.out.println("\tresult = " + result);    list.clear();    list.add(factory.parse("b"));    list.add(new Integer(4));    result = factory.make("f(1,<term>,c,<int>)", list);    System.out.println("\tresult = " + result);    list.clear();    list.add(factory.parse("b"));    list.add(new Integer(4));    result = factory.make("f(1,g(<term>),c,h(<int>))", list);    System.out.println("\tresult = " + result);          /*    list.add(new Integer(1));    test(factory.make("<int>", list).equals(T[0]), "make-1");    list.clear(); list.add(T[3]);    test(factory.make("<term>", list).equals(T[3]), "make-2");    list.clear(); list.add( "b");    test(factory.make("<appl>", list).equals(T[4]), "make-3");    list.clear(); list.add(new Double(3.14));    test(factory.make("<real>", list).equals(      factory.makeReal(3.14)), "make-4");    list.clear(); list.add(factory.makeAppl(      factory.makeAFun("real",0,false)));    test(factory.make("<placeholder>", list).equals(      factory.parse("<real>")), "make-5");    list.clear(); list.add(T[7]);    test(factory.make("[<list>]", list).equals(T[7]), "make-6");    list.clear();    list.add(T[3]);    list.add("b");    list.add(factory.makeList(T[5], factory.makeList()));    test(factory.make("f(<term>,<appl>,<list>)", list).equals(T[6]), "make-7");    list.clear();    list.add("f");    list.add(new Integer(2));    test(factory.make("<appl(1,<int>,3)>", list).equals(T[8]), "make-8");      */    System.out.println("pass: testPatternMake");  }