!7 cmodule TestPhilosophyBot1 > DynPrintLog { transient LS musingSnippets = ll(#1025734, #1025756); transient ReliableSingleThread rstUpdateList = dm_rstWithDelay(this, 0.5, r updateListImpl); transient LS errors = listWithNotify(rstUpdateList); transient JList jList; visual jhsplit(super, jCenteredLiveValueSection(dm_calculatedLiveValue(S, () -> "Errors (" + l(errors) + ")"), jList = listPopupMenuItemsThreaded(jlist(errors), "Show text", r { showText("Test Error", selectedItem(jList)) } ))); start-thread { for (S snippetID : musingSnippets) dm_onSnippetEdited(snippetID, r dm_reload); try { new Scorer scorer; // infos are print logs errors.clear(); scorer.errors = errors; Var n = new(0); for (S snippetID : musingSnippets) { Scorer scorer2, int n2 = unpair test_PhilosophyBot1(snippetID); incIntVar(n, n2); scorer.add(scorer2); } // local DB for (S musing : (LS) collect text((Cl) dm_call(dm_aiMusingsCRUD(), "concepts"))) addTestToScorerWithPrintLog(scorer, r { incIntVar(n, ai_checkMusing(musing)); }); for (Runnable r : ll( r test_FactStore, r test_philosophyBot1_nativePredicateOnLHS, r test_philosophyBot1_dropCommentParagraphs, )) addTestToScorerWithPrintLog(scorer, r); if (scorer.allCorrect()) infoBox("PhilosophyBot1 tested OK - " + n2(n!, "expectation") + " tested / " + scorer); else infoBox("PhilosophyBot1 failures - " + n2(n!, "expectation") + " tested / " + scorer); } on fail { infoBox("PhilosophyBot1 fail"); } } void updateListImpl { fillListWithStrings(jList, errors); } }