Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangString


    @SuppressWarnings("boxing")
    @Test
    public void cvtListOk_2() throws SignatureException {
        test(new Object[] { "a", 35 }, "lx", new OtpErlangList(new OtpErlangObject[] {
                new OtpErlangString("a"), new OtpErlangLong(35) }));
    }
View Full Code Here


    }

    @Test(expected = SignatureException.class)
    public void cvtListFail_1() throws SignatureException {
        test(new String[] { "a" }, "li", new OtpErlangList(
                new OtpErlangObject[] { new OtpErlangString("a") }));
    }
View Full Code Here

    @SuppressWarnings("boxing")
    @Test(expected = SignatureException.class)
    public void cvtListFail_2() throws SignatureException {
        test(new Object[] { "a", 35 }, "ls", new OtpErlangList(new OtpErlangObject[] {
                new OtpErlangString("a"), new OtpErlangLong(35) }));
    }
View Full Code Here

        test("astring", "a", new OtpErlangAtom("astring"));
    }

    @Test
    public void cvtStringOk_2() throws SignatureException {
        test("astring", "s", new OtpErlangString("astring"));
    }
View Full Code Here

        test("astring", "s", new OtpErlangString("astring"));
    }

    @Test
    public void cvtStringOk_4() throws SignatureException {
        test("", "s", new OtpErlangString(""));
    }
View Full Code Here

        test("astring", "b", new OtpErlangBinary("astring".getBytes()));
    }

    @Test(expected = SignatureException.class)
    public void cvtStringFail_1() throws SignatureException {
        test("astring", "p", new OtpErlangString("astring"));
    }
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

            try {
                final IFolder dest = project.getFolder(page.getDestination());
                if (!dest.exists()) {
                    dest.create(true, true, null);
                }
                options.put("dir", new OtpErlangString(dest.getLocation().toString()));
                final List<String> files = new ArrayList<String>();
                final IErlProject erlProject = ErlangEngine.getInstance().getModel()
                        .findProject(project);
                for (final IPath dir : erlProject.getProperties().getSourceDirs()) {
                    final IFolder folder = project.getFolder(dir);
View Full Code Here

TOP

Related Classes of com.ericsson.otp.erlang.OtpErlangString

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.