assertExamplesHold
fun assertExamplesHold(library: Library, skip: Set<String> = emptySet(), extra: Map<String, String> = emptyMap(), newSolver: () -> Solver)
Same as the other assertExamplesHold, for the documentation of library plus extra subjects.
fun assertExamplesHold(documentation: Map<String, String>, skip: Set<String> = emptySet(), newSolver: () -> Solver)
Runs the ``` ```prolog ``` example blocks of every subject in documentation (e.g. atom/1 or flag(unknown)) but the skipped ones, each block on a fresh solver created by newSolver, and asserts they behave as stated.
A block is a sequence of ?- Goal. queries, run in order, each followed by its expected answer: yes., no., throws Error. (Error must unify with the raised error term), or the bindings of the first solutions, e.g. X = 1 ; X = 2. (only the listed variables and solutions are checked). Lines starting with % are ignored.