TestCustomDataImpl

Concrete implementation of TestCustomData, instantiated via TestCustomData.prototype.

Constructors

Link copied to clipboard
constructor(solverFactory: SolverFactory)

Properties

Link copied to clipboard

A long test max duration, four times mediumDuration; used for queries involving deeper search or recursion.

Link copied to clipboard

A medium test max duration, twice shortDuration; used for queries involving a handful of resolution steps.

Link copied to clipboard

A short test max duration, used for queries expected to resolve almost immediately.

Functions

Link copied to clipboard
open override fun testApi()

Tests that a fresh Solver's API exposes all six custom-data get/set primitives.

Link copied to clipboard
open override fun testDurableData()

Same query shape as testEphemeralData but using set_durable/2/get_durable/2: unlike ephemeral data, durable data survives backtracking, so both attempts at get_durable/2 succeed, binding X to 1.

Link copied to clipboard
open override fun testEphemeralData()

Tests that, within a single query set_ephemeral(key, 1), (get_ephemeral(key, X) ; get_ephemeral(key, X)), the first get_ephemeral/2 succeeds binding X to 1, but backtracking into the disjunction to retry get_ephemeral/2 a second time fails: ephemeral data does not survive backtracking within the same query.

Link copied to clipboard
open override fun testPersistentData()

Tests that persistent data survives across separate solve calls on the same Solver: after solving set_persistent(key, 1) in one call, a separate solve call for get_persistent(key, X) still succeeds (binding X to 1), and a query combining both within a single call behaves like testDurableData.