Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangLong


        Assert.assertEquals(r.longValue(), 34);
    }

    @Test
    public void int_2() throws TermParserException {
        final OtpErlangLong r = (OtpErlangLong) termParser.parse("-34");
        Assert.assertEquals(r.longValue(), -34);
    }
View Full Code Here


        Assert.assertEquals(r.atomValue(), "hello");
    }

    @Test
    public void number_1() throws TermParserException {
        final OtpErlangLong r = (OtpErlangLong) termParser.parse("321");
        Assert.assertEquals(r.longValue(), 321);
    }
View Full Code Here

    }

    @SuppressWarnings("boxing")
    @Test
    public void cvtIntegerOk_1() throws SignatureException {
        test(397, "i", new OtpErlangLong(397));
    }
View Full Code Here

    }

    @SuppressWarnings("boxing")
    @Test
    public void cvtIntegerOk_2() throws SignatureException {
        test(3, "x", new OtpErlangLong(3));
    }
View Full Code Here

    }

    @Test
    public void cvtIntegerOk_3() throws SignatureException {
        final BigInteger bigInteger = new BigInteger("39799999999999999999999", 10);
        test(bigInteger, "i", new OtpErlangLong(bigInteger));
    }
View Full Code Here

    }

    @SuppressWarnings("boxing")
    @Test(expected = SignatureException.class)
    public void cvtIntegerFail_1() throws SignatureException {
        test(3, "s", new OtpErlangLong(3));
    }
View Full Code Here

    @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

    @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

            } else if ("true".equals(s)) {
                n = 1;
            } else {
                n = Integer.parseInt(s);
            }
            final OtpErlangLong l = new OtpErlangLong(n);
            final OtpErlangTuple t = new OtpErlangTuple(new OtpErlangObject[] { a, l });
            result.add(t);
        }
        return result;
    }
View Full Code Here

        final OtpErlangTuple modLineT = ((OtpErlangTuple) i);
        OtpErlangObject _elementAt_1 = modLineT.elementAt(0);
        final String modName = Util.stringValue(_elementAt_1);
        final OtpErlangObject nameO = modLineT.elementAt(1);
        OtpErlangObject _elementAt_2 = modLineT.elementAt(2);
        final OtpErlangLong arityL = ((OtpErlangLong) _elementAt_2);
        final int arity = arityL.intValue();
        OtpErlangObject _elementAt_3 = modLineT.elementAt(3);
        final String clauseHead = Util.stringValue(_elementAt_3);
        OtpErlangObject _elementAt_4 = modLineT.elementAt(4);
        final OtpErlangAtom subClause = ((OtpErlangAtom) _elementAt_4);
        OtpErlangObject _elementAt_5 = modLineT.elementAt(5);
        final OtpErlangLong offsetL = ((OtpErlangLong) _elementAt_5);
        OtpErlangObject _elementAt_6 = modLineT.elementAt(6);
        final OtpErlangLong lengthL = ((OtpErlangLong) _elementAt_6);
        OtpErlangObject _elementAt_7 = modLineT.elementAt(7);
        final OtpErlangAtom isDef = ((OtpErlangAtom) _elementAt_7);
        String name = null;
        if ((nameO instanceof OtpErlangAtom)) {
          String _atomValue = ((OtpErlangAtom)nameO).atomValue();
          name = _atomValue;
        } else {
          String _stringValue = Util.stringValue(nameO);
          name = _stringValue;
        }
        int _intValue = offsetL.intValue();
        int _intValue_1 = lengthL.intValue();
        String _atomValue_1 = subClause.atomValue();
        boolean _parseBoolean = Boolean.parseBoolean(_atomValue_1);
        String _atomValue_2 = isDef.atomValue();
        boolean _parseBoolean_1 = Boolean.parseBoolean(_atomValue_2);
        ModuleLineFunctionArityRef _moduleLineFunctionArityRef = new ModuleLineFunctionArityRef(modName, _intValue, _intValue_1, name, arity, clauseHead, _parseBoolean, _parseBoolean_1);
View Full Code Here

TOP

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

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.