Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangObject$Hash


        });
    }

    private OtpErlangObject callErlang(final int offset, final int length,
            final String text) throws RpcException {
        final OtpErlangObject r1 = doIndentLines(offset, length, text, false, "");
        return r1;
    }
View Full Code Here


        final Map<String, String> prefs = new TreeMap<String, String>();
        IndentationPreferencePage.addKeysAndPrefs(prefs);
        SmartTypingPreferencePage.addAutoNLKeysAndPrefs(prefs);
        final boolean useTabs = AutoIndentStrategy.getUseTabsFromPreferences();
        if (template) {
            final OtpErlangObject r1 = indentService.templateIndentLines(prefix, text,
                    tabw, useTabs, prefs);
            return r1;
        }
        final OtpErlangObject r1 = indentService.indentLines(offset, length, text, tabw,
                useTabs, prefs);
        return r1;
    }
View Full Code Here

        assertEquals(value, expected);
    }

    @Test
    public void testIoListToString_small() {
        final OtpErlangObject input = OtpErlang.mkList(new OtpErlangString("hej"),
                new OtpErlangString("hoj"));
        final String result = Util.ioListToString(input, 10);
        final String expected = "hejhoj";
        Assert.assertEquals(expected, result);
    }
View Full Code Here

        Assert.assertEquals(expected, result);
    }

    @Test
    public void testIoListToString_large1() {
        final OtpErlangObject input = OtpErlang.mkList(new OtpErlangString("hej"),
                new OtpErlangString("hoj"));
        final String result = Util.ioListToString(input, 4);
        final String expected = "hejh... <truncated>";
        Assert.assertEquals(expected, result);
    }
View Full Code Here

        Assert.assertEquals(expected, result);
    }

    @Test
    public void testIoListToString_large2() {
        final OtpErlangObject input = OtpErlang.mkList(new OtpErlangString("hej"),
                new OtpErlangString("hoj"));
        final String result = Util.ioListToString(input, 6);
        final String expected = "hejhoj";
        Assert.assertEquals(expected, result);
    }
View Full Code Here

        Assert.assertEquals(expected, result);
    }

    @Test
    public void testIsTag_number() throws TermParserException {
        final OtpErlangObject input = OtpErlang.getTermParser().parse("3");
        Assert.assertEquals(false, Util.isTag(input, "ok"));
    }
View Full Code Here

        Assert.assertEquals(false, Util.isTag(input, "ok"));
    }

    @Test
    public void testIsTag_good_atom() throws TermParserException {
        final OtpErlangObject input = OtpErlang.getTermParser().parse("ok");
        Assert.assertEquals(true, Util.isTag(input, "ok"));
    }
View Full Code Here

        Assert.assertEquals(true, Util.isTag(input, "ok"));
    }

    @Test
    public void testIsTag_wrong_atom() throws TermParserException {
        final OtpErlangObject input = OtpErlang.getTermParser().parse("okx");
        Assert.assertEquals(false, Util.isTag(input, "ok"));
    }
View Full Code Here

        Assert.assertEquals(false, Util.isTag(input, "ok"));
    }

    @Test
    public void testIsTag_tuple_int() throws TermParserException {
        final OtpErlangObject input = OtpErlang.getTermParser().parse("{3,9}");
        Assert.assertEquals(false, Util.isTag(input, "ok"));
    }
View Full Code Here

        Assert.assertEquals(false, Util.isTag(input, "ok"));
    }

    @Test
    public void testIsTag_tuple_good_atom() throws TermParserException {
        final OtpErlangObject input = OtpErlang.getTermParser().parse("{ok, 9}");
        Assert.assertEquals(true, Util.isTag(input, "ok"));
    }
View Full Code Here

TOP

Related Classes of com.ericsson.otp.erlang.OtpErlangObject$Hash

Copyright © 2018 www.massapicom. 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.