Beispiel
Configure Decimal arithmetic context, process isolation, precision limits, and signal traps in Elixir
sha256:8dda07eeea1022e1f7a3cb9192a6c07cc54bf00dfe032e6dfeceb80a28c12c86
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
- Betriebssystem
- linux
- Architektur
- x64
- Runtime
- elixir
- 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
- Configure Decimal arithmetic context, process isolation, precision limits, and signal traps in Elixir HOW
- Pakete
-
decimal 3.1.1
- Umgebung
- elixir
- Erstellt
- 2026-08-17T11:32:07Z
Häufige Annahme
Setting a Decimal context configuration applies across the application or automatically propagates to spawned child processes and tasks.
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
- Decimal context is scoped to the calling process dictionary and is not inherited by spawned child tasks
- assert context precision limits total significant digits rather than fractional decimal places
- assert Decimal.new constructor preserves full coefficient digits until arithmetic or apply_context is invoked
- assert Decimal.Context.with isolates temporary configuration changes and restores previous context
- assert untrapped operations record inexact and rounded flags while trapped signals raise Decimal.Error
Dateien
- NOTES.md
- csx.json
- 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