View Source Guesswork.Answer.Test (Guesswork v0.5.0)

A Guesswork.Answer.Computation bound to a concrete value that can be used to verify correctness.

Summary

Functions

Checks the environment for the inputs, and then runs the stored functions before checking the result against the value. If the inputs are not present or not concrete values, an error is returned.

Types

@type t() :: %Guesswork.Answer.Test{
  computation: Guesswork.Answer.Computation.t(),
  negated: boolean(),
  value: Guesswork.Ast.Term.t()
}

Functions

Link to this function

new(computation, value, negated)

View Source
Link to this function

run(test, env, query_id)

View Source

Checks the environment for the inputs, and then runs the stored functions before checking the result against the value. If the inputs are not present or not concrete values, an error is returned.