Search in sources :

Example 1 with DynamicTruthBeliefTable

use of nars.concept.dynamic.DynamicTruthBeliefTable in project narchy by automenta.

the class BeliefTableTest method assertDuration.

static void assertDuration(NAR n, String c, long start, long end) throws Narsese.NarseseException {
    TaskConcept cc = (TaskConcept) n.conceptualize(c);
    assertNotNull(cc, c + " unconceptualized");
    List<Task> tt = cc.beliefs().streamTasks().collect(toList());
    assertTrue(cc.beliefs() instanceof DynamicTruthBeliefTable || !tt.isEmpty(), c + " not believed");
    if (!tt.isEmpty()) {
        Task t = tt.get(0);
        // System.out.println(sim.proof());
        // System.out.println(sim.start() + ".." + /*sim.occurrence() + ".."*/ + sim.end());
        assertEquals(start, t.start());
        assertEquals(end, t.end());
    }
}
Also used : TaskConcept(nars.concept.TaskConcept) DynamicTruthBeliefTable(nars.concept.dynamic.DynamicTruthBeliefTable)

Aggregations

TaskConcept (nars.concept.TaskConcept)1 DynamicTruthBeliefTable (nars.concept.dynamic.DynamicTruthBeliefTable)1