Examples of toTerm()


Examples of org.erlide.core.builder.CompilerOption.BooleanOption.toTerm()

    }

    @Test
    public void testToTerm_1() {
        final BooleanOption option = CompilerOption.WARN_EXPORT_ALL;
        final OtpErlangObject actual = option.toTerm(true);
        final String expected = "warn_export_all";
        Assert.assertEquals(expected, actual.toString());
    }

    @Test
View Full Code Here

Examples of org.erlide.core.builder.CompilerOption.BooleanOption.toTerm()

    }

    @Test
    public void testToTerm_2() {
        final BooleanOption option = CompilerOption.WARN_EXPORT_ALL;
        final OtpErlangObject actual = option.toTerm(false);
        final String expected = "nowarn_export_all";
        Assert.assertEquals(expected, actual.toString());
    }

    @Test
View Full Code Here

Examples of org.erlide.core.builder.CompilerOption.BooleanOption.toTerm()

    }

    @Test
    public void testToTerm_3() {
        final BooleanOption option = CompilerOption.DEBUG_INFO;
        final OtpErlangObject actual = option.toTerm(true);
        final String expected = "debug_info";
        Assert.assertEquals(expected, actual.toString());
    }

    @Test
View Full Code Here

Examples of org.erlide.core.builder.CompilerOption.BooleanOption.toTerm()

    }

    @Test
    public void testToTerm_4() {
        final BooleanOption option = CompilerOption.DEBUG_INFO;
        final OtpErlangObject actual = option.toTerm(false);
        final String expected = null;
        Assert.assertEquals(expected, actual);
    }

    @Test
View Full Code Here

Examples of org.erlide.core.builder.CompilerOption.BooleanOption.toTerm()

    }

    @Test
    public void testToTerm_6() {
        final BooleanOption option = CompilerOption.WARN_EXPORT_ALL;
        final OtpErlangObject actual = option.toTerm(false);
        final String expected = "nowarn_export_all";
        Assert.assertEquals(expected, actual.toString());
    }

}
View Full Code Here

Examples of org.erlide.core.builder.CompilerOption.DefineOption.toTerm()

    public void testToTerm_5() throws TermParserException {
        final DefineOption option = CompilerOption.DEFINE;
        @SuppressWarnings("unchecked")
        final List<Pair<String, String>> values = Lists
                .newArrayList(new Pair<String, String>("Macro", "[hej,1]"));
        final OtpErlangObject actual = option.toTerm(values);
        final String expected = "[{d,'Macro',[hej,1]}]";
        Assert.assertEquals(expected, actual.toString());
    }

    @Test
View Full Code Here

Examples of org.erlide.core.builder.CompilerOption.DefineOption.toTerm()

    public void testToTerm_5a() throws TermParserException {
        final DefineOption option = CompilerOption.DEFINE;
        @SuppressWarnings("unchecked")
        final List<Pair<String, String>> values = Lists
                .newArrayList(new Pair<String, String>("Macro", ""));
        final OtpErlangObject actual = option.toTerm(values);
        final String expected = "[{d,'Macro'}]";
        Assert.assertEquals(expected, actual.toString());
    }

    @Test
View Full Code Here

Examples of org.ggp.base.util.gdl.grammar.GdlRelation.toTerm()

            GdlRule rule = (GdlRule)gdl;
            GdlSentence head = rule.getHead();
            if(head instanceof GdlRelation)
            {
                GdlRelation rel = (GdlRelation)head;
                GdlTerm term = rel.toTerm();

                GdlTerm generified = findGenericForm(term);
                if(!domains.containsKey(generified))
                    domains.put(generified, new Domain(generified, term));
                Domain dom = domains.get(generified);
View Full Code Here

Examples of org.ggp.base.util.gdl.grammar.GdlRelation.toTerm()

        {
            GdlRelation relation = (GdlRelation) gdl;
            String name = relation.getName().toString();
            if(!name.equals("base"))
            {
                GdlTerm term = relation.toTerm();
                GdlTerm generified = findGenericForm(term);
                Assignment instantiation = getConstantList(term);
                if(!domains.containsKey(generified))
                    domains.put(generified, new Domain(generified, term));
                Domain dom = domains.get(generified);
View Full Code Here

Examples of test.list.types.NineSeps.toTerm()

    Module m = factory.makeModule_Default("m");
    Module m2 = factory.makeModule_Default("m2");
    NineSeps ns = factory.makeNineSeps(m, factory.makeNineSeps(m2));

    testAssert(
      ns.toTerm().isEqual(factory.getPureFactory().parse("[\"m\",1,2,3,4,5,6,7,8,9,\"m2\"]")),
      "many separated toTerm");
    testAssert(ns.reverse().isEqual(factory.makeNineSeps(m2, factory.makeNineSeps(m))), "many separated reverse");
    testAssert(ns.reverse().reverse().isEqual(ns), "reverse separated list test");

    try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.