Search in sources :

Example 86 with OtpErlangAtom

use of com.ericsson.otp.erlang.OtpErlangAtom in project erlide_eclipse by erlang.

the class TermParserTest method atom_3.

@Test
public void atom_3() throws OtpParserException {
    final OtpErlangAtom r = (OtpErlangAtom) termParser.parse("   hello");
    Assert.assertEquals(r.atomValue(), "hello");
}
Also used : OtpErlangAtom(com.ericsson.otp.erlang.OtpErlangAtom) Test(org.junit.Test)

Example 87 with OtpErlangAtom

use of com.ericsson.otp.erlang.OtpErlangAtom in project erlide_eclipse by erlang.

the class PatternMatchTest method testMatch.

@Test
public void testMatch() throws Exception {
    final OtpBindings r = OtpErlang.match("[W, V]", "[a, b]");
    Assert.assertEquals(r.get("W"), new OtpErlangAtom("a"));
    Assert.assertEquals(r.get("V"), new OtpErlangAtom("b"));
}
Also used : OtpBindings(org.erlide.util.erlang.OtpBindings) OtpErlangAtom(com.ericsson.otp.erlang.OtpErlangAtom) Test(org.junit.Test)

Aggregations

OtpErlangAtom (com.ericsson.otp.erlang.OtpErlangAtom)87 OtpErlangObject (com.ericsson.otp.erlang.OtpErlangObject)56 OtpErlangTuple (com.ericsson.otp.erlang.OtpErlangTuple)48 OtpErlangList (com.ericsson.otp.erlang.OtpErlangList)32 OtpErlangString (com.ericsson.otp.erlang.OtpErlangString)24 OtpErlangLong (com.ericsson.otp.erlang.OtpErlangLong)17 ArrayList (java.util.ArrayList)16 Test (org.junit.Test)14 OtpErlangRangeException (com.ericsson.otp.erlang.OtpErlangRangeException)11 RpcException (org.erlide.runtime.rpc.RpcException)11 OtpBindings (org.erlide.util.erlang.OtpBindings)9 IErlElement (org.erlide.engine.model.IErlElement)6 OtpErlangBinary (com.ericsson.otp.erlang.OtpErlangBinary)4 OtpErlangPid (com.ericsson.otp.erlang.OtpErlangPid)4 IErlModule (org.erlide.engine.model.root.IErlModule)4 OtpErlangInt (com.ericsson.otp.erlang.OtpErlangInt)3 OtpErlangMap (com.ericsson.otp.erlang.OtpErlangMap)3 Subscribe (com.google.common.eventbus.Subscribe)3 Collection (java.util.Collection)3 OtpErlangException (com.ericsson.otp.erlang.OtpErlangException)2