# `Spectre.Eval.Case`
[🔗](https://github.com/elchemista/spectre/blob/0.3.0/lib/spectre/eval/case.ex#L1)

One version-controlled routing expectation.

Cases can be created from ordinary maps or decoded JSONL objects. Labels and
strategies remain strings so loading an external corpus never creates atoms.

# `t`

```elixir
@type t() :: %Spectre.Eval.Case{
  allowed_routes: [String.t()],
  context: map(),
  expected_outcome: Spectre.Router.Receipt.outcome(),
  expected_output: String.t() | nil,
  expected_route: String.t() | nil,
  expected_strategy: String.t() | nil,
  id: String.t(),
  input: String.t() | map(),
  llm: :forbidden | :allowed | :required,
  max_duration_us: pos_integer() | nil,
  state: map() | keyword(),
  tags: [String.t()]
}
```

# `expected_routes`

```elixir
@spec expected_routes(t()) :: [String.t()]
```

Returns all accepted route labels for this case in canonical form.

# `new`

```elixir
@spec new(t() | map()) :: {:ok, t()} | {:error, term()}
```

Validates and normalizes a case map.

# `to_data`

```elixir
@spec to_data(t()) :: map()
```

Returns the complete portable shape used to identify an evaluation case.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
