diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-10-31 03:17:49 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-10-31 03:17:49 -0300 |
| commit | 2c500b00e821c11aa9d5c86985e6adc2b59572a9 (patch) | |
| tree | ade8f8018b40294649d9105a9b85dd560bf3b49e /test/unit/kernel/EphemeralRelation.ml | |
| parent | 55174a28581c33c4b6d91066086a2ee7b5c663ea (diff) | |
| download | RNT-2c500b00e821c11aa9d5c86985e6adc2b59572a9.tar.gz RNT-2c500b00e821c11aa9d5c86985e6adc2b59572a9.zip | |
share the condition check and employee fixture across tests
Diffstat (limited to 'test/unit/kernel/EphemeralRelation.ml')
| -rw-r--r-- | test/unit/kernel/EphemeralRelation.ml | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/test/unit/kernel/EphemeralRelation.ml b/test/unit/kernel/EphemeralRelation.ml index 9426b9a..5c85d7f 100644 --- a/test/unit/kernel/EphemeralRelation.ml +++ b/test/unit/kernel/EphemeralRelation.ml @@ -69,16 +69,10 @@ let decides_membership () = check bool "a stranger is refused" false rejects let refuses_to_scan_without_end () = - match Protocols.Relation.require (endless ()) with - | Error condition -> fail (Concepts.Condition.to_string_hum condition) - | Ok relation -> ( - match Protocols.Relation.contains relation (member 9) with - | Error condition -> - check bool "it fails as undecidable instead of scanning" true - (BatString.starts_with - (Concepts.Condition.to_string_hum condition) - "undecidable-membership" ) - | Ok _ -> fail "an endless relation with no test decided membership" ) + Helpers.refuses "it fails as undecidable instead of scanning" "undecidable-membership" + (Result.bind + (Protocols.Relation.require (endless ())) + (fun relation -> Protocols.Relation.contains relation (member 9)) ) let describes_itself () = let described = |
