TestFlags
Conformance tests for the current_flag/2 and set_flag/2 built-ins (current_prolog_flag/2 and set_prolog_flag/2 are deprecated aliases kept for ISO naming compatibility), and for the it.unibo.tuprolog.solve.flags.FlagStore they operate on: default values, admissible values, error cases (non-atom names, unbound names/values, out-of-domain values), and the ability to both read and write flags that are not part of the built-in set. Shared by every Solver implementation via the TestFlags.prototype(solverFactory) factory (see TestClassicFlags in :solve-classic for a concrete usage).
Inheritors
Properties
A long test max duration, four times mediumDuration; used for queries involving deeper search or recursion.
A medium test max duration, twice shortDuration; used for queries involving a handful of resolution steps.
A short test max duration, used for queries expected to resolve almost immediately.
Functions
Tests that the query
Tests that it.unibo.tuprolog.solve.flags.LastCallOptimization's default value is on, and that the query
Tests that it.unibo.tuprolog.solve.flags.Unknown's default value is warning, and that the query
Tests that every flag returned by current_flag(F, _) (with F unbound) is bound to an atom, and that passing a non-atom flag name (an integer, a compound, a float) to either current_flag/2 or set_flag/2 fails producing a type_error(atom, Name).
Tests that current_flag(F, X), with F unbound, enumerates on backtracking every flag currently set on the solver (each name bound to F, each value bound to X), matching the solver's flags map exactly.
Tests that, for flag names not present in a solver's default flags map (a, b, c), the query
Tests that the query
Tests that, for flag names not present in a solver's default flags map (a, b, c), the query
Tests that, for every admissible value of the unknown flag, the query
Tests that the query