use of nars.term.compound.util.Conj in project narchy by automenta.
the class ConjTest method testSimpleEternals.
@Test
public void testSimpleEternals() {
Conj c = new Conj();
c.add($.the("x"), ETERNAL);
c.add($.the("y"), ETERNAL);
assertEquals("(x&&y)", c.term().toString());
assertEquals(1, c.event.size());
assertEquals(byte[].class, c.event.get(ETERNAL).getClass());
}
use of nars.term.compound.util.Conj in project narchy by automenta.
the class ConjTest method testRoaringBitmapNeededManyEventsAtSameTime.
@Test
public void testRoaringBitmapNeededManyEventsAtSameTime() {
Conj c = new Conj();
c.add($.the("a"), 1);
c.add($.the("b"), 1);
c.add($.the("c"), 1);
c.add($.the("d"), 1);
c.add($.the("e"), 1);
assertEquals("(&|,a,b,c,d,e)", c.term().toString());
assertEquals(1, c.event.size());
assertEquals(RoaringBitmap.class, c.event.get(1).getClass());
}
use of nars.term.compound.util.Conj in project narchy by automenta.
the class ConjTest method testEventContradictionWithEternal.
@Test
public void testEventContradictionWithEternal() {
Conj c = new Conj();
c.add($.the("x"), ETERNAL);
c.add($.the("x").neg(), 1);
assertEquals(False, c.term());
}
Aggregations