Tune.Case (Tune v0.5.0)

Copy Markdown View Source

One normalized input and expected result.

Summary

Functions

Returns the canonical key for one case input.

Normalizes program rows against one typed signature.

Types

t()

@type t() :: %Tune.Case{
  expected: term(),
  id: String.t(),
  input: term(),
  metadata: map()
}

Functions

input_key(case)

@spec input_key(t()) :: String.t()

Returns the canonical key for one case input.

normalize_all(signature, rows)

@spec normalize_all(Tune.Signature.t(), Enumerable.t()) ::
  {:ok, [t()]} | {:error, Exception.t()}

Normalizes program rows against one typed signature.