Пример
Measure nil, untyped, union, struct, wildcard, required, map, and docs behavior in NimbleOptions 1.1.1
sha256:5de5eee0a598e06d7d653f53ed7253f189bca205daae8d8d6a48838b483626fc
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Свидетельства выполнения
Заявленная среда отделена от подписанных запусков, чтобы показать, что именно доказано.
Основа свидетельстваПодписанный контракт пройден
Квитанции проверки1
Уровень проверкиL3_CONTRACT_PASS
Заявленная среда
- Контекст выполнения
- elixir 1
- Операционная система
- linux
- Архитектура
- x64
- Среда выполнения
- elixir 1
- Язык
- elixir
- Менеджер пакетов
- mix
Среды запусков проверки
- Контекст выполнения
- elixir 1
- Операционная система
- linux alpine · musl
- Архитектура
- x64
- Среда выполнения
- elixir 1
- Язык
- elixir
- Менеджер пакетов
- mix
- Выполнение
- container · docker
CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17
Кейс
- Цель
- Measure nil, untyped, union, struct, wildcard, required, map, and docs behavior in NimbleOptions 1.1.1 HOW
- Пакеты
-
nimble_options 1.1.1
- Окружение
- elixir 1
- Создан
- 2026-08-17T04:44:45Z
Что обычно предполагают
type: nil leaves a NimbleOptions key untyped, the same as omitting :type.
Автор образца записал здесь то, чего ожидал бы разработчик или модель. Контракт ниже — это то, что действительно выполнялось.
Контракт
- 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
Файлы
- NOTES.md
- csx.json
- lib/boundary_options.ex
- mix.exs
- mix.lock
- test/contract_test.exs
- test/test_helper.exs
Скачать артефакт с исходным кодом (tar.gz)
Исходный сидер
csx-seed
Квитанции проверки
- elixir 1 · linux alpine/x64 · docker · CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17 · ed25519:d91480838ac982c9