Skip to content

🧪 Cover NewEmpty's documented empty-interpreter contract #83

Description

@ccamel

Summary

NewEmpty documents an interpreter with no predicates or operators in interpreter.go:23-28, but root tests do not call it and coverage.txt:2 records its constructor branch as uncovered.

Why it matters

The public empty-interpreter constructor needs an executable contract that distinguishes it from New and prevents accidental bootstrap or builtin registration.

Scope

Add TestNewEmpty to interpreter_test.go for the documented empty state.

Acceptance criteria

  • NewEmpty().QuerySolution("missing.").Err() renders error(existence_error(procedure,missing/0),root).
  • The test demonstrates that NewEmpty has not registered builtins.
  • The test demonstrates that NewEmpty has not loaded bootstrap predicates or operators.

Verification

Run go test . -run '^TestNewEmpty$' and assert the exact rendered error from the missing zero-arity procedure query.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions