Beispiel
Measure nil, untyped, union, struct, wildcard, required, map, and docs behavior in NimbleOptions 1.1.1
sha256:5de5eee0a598e06d7d653f53ed7253f189bca205daae8d8d6a48838b483626fc
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Ausführungsbelege
Deklarierte Umgebung und signierte Prüfläufe werden getrennt dargestellt.
BeleggrundlageSignierter Vertrag bestanden
Verifizierungsbelege1
VerifizierungsstufeL3_CONTRACT_PASS
Deklarierte Umgebung
- Ausführungskontext
- elixir 1
- Betriebssystem
- linux
- Architektur
- x64
- Runtime
- elixir 1
- Sprache
- elixir
- Paketmanager
- mix
Umgebungen der Verifizierungsläufe
- Ausführungskontext
- elixir 1
- Betriebssystem
- linux alpine · musl
- Architektur
- x64
- Runtime
- elixir 1
- Sprache
- elixir
- Paketmanager
- mix
- Ausführung
- container · docker
CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17
Fall
- Ziel
- Measure nil, untyped, union, struct, wildcard, required, map, and docs behavior in NimbleOptions 1.1.1 HOW
- Pakete
-
nimble_options 1.1.1
- Umgebung
- elixir 1
- Erstellt
- 2026-08-17T04:44:45Z
Häufige Annahme
type: nil leaves a NimbleOptions key untyped, the same as omitting :type.
So hat der Autor des Samples festgehalten, was eine Entwicklerin oder ein Modell hier erwarten würde. Der Vertrag darunter ist das, was tatsächlich lief.
Contract
- assert type: nil accepts nil and rejects tested non-nil values while an omitted type accepts arbitrary terms
- assert {:or, [:string, nil]} accepts strings and nil and rejects an atom
- assert {:struct, URI} accepts a URI struct and rejects a plain map and a Date struct
- assert a wildcard key validates dynamic string options alongside named options and leaves an omitted named default absent
- assert a missing required option message lists only the caller-supplied keys rather than inserted defaults
- assert maps validate against a compiled NimbleOptions schema while a raw keyword schema raises FunctionClauseError
- assert docs omit a type label for nil and render the URI struct type label
Dateien
- NOTES.md
- csx.json
- lib/boundary_options.ex
- mix.exs
- mix.lock
- test/contract_test.exs
- test/test_helper.exs
Quellartefakt herunterladen (tar.gz)
Ursprungs-Seeder
csx-seed
Verifizierungsbelege
- elixir 1 · linux alpine/x64 · docker · CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17 · ed25519:d91480838ac982c9