aboutsummaryrefslogtreecommitdiffstats
path: root/test/integration/Karuta.ml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-10-31 03:17:49 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-10-31 03:17:49 -0300
commit2c500b00e821c11aa9d5c86985e6adc2b59572a9 (patch)
treeade8f8018b40294649d9105a9b85dd560bf3b49e /test/integration/Karuta.ml
parent55174a28581c33c4b6d91066086a2ee7b5c663ea (diff)
downloadRNT-2c500b00e821c11aa9d5c86985e6adc2b59572a9.tar.gz
RNT-2c500b00e821c11aa9d5c86985e6adc2b59572a9.zip
share the condition check and employee fixture across tests
Diffstat (limited to 'test/integration/Karuta.ml')
-rw-r--r--test/integration/Karuta.ml9
1 files changed, 2 insertions, 7 deletions
diff --git a/test/integration/Karuta.ml b/test/integration/Karuta.ml
index 2b02e69..f03e25e 100644
--- a/test/integration/Karuta.ml
+++ b/test/integration/Karuta.ml
@@ -80,11 +80,6 @@ let titles batch =
|> List.map (fun {Concepts.Tuple.attributes; _} ->
Concepts.Value.to_string (BatMap.String.find "title" attributes) )
-let fails_with name = function
- | Ok _ -> fail ("expected " ^ name)
- | Error c ->
- check bool name true (BatString.starts_with (Concepts.Condition.to_string_hum c) name)
-
let reads_in_batches node =
let batches =
begin
@@ -164,12 +159,12 @@ let reads_a_program_of_no_path ({root; image} as node) =
["C. J. Date"; "Donald Knuth"; "Harold Abelson"; "Richard Mitchell"] )
let a_missing_function_fails node =
- fails_with "beam-failed"
+ Helpers.refuses "a missing function fails the call" "beam-failed"
(Result.bind (run node "library" "nope" ["title"]) (fun relation ->
Protocols.Handle.releasing relation (fun () -> Protocols.Relation.read relation) ) )
let a_malformed_term_is_refused {root; _} =
- fails_with "malformed-beam-program"
+ Helpers.refuses "a term that is not a program is refused" "malformed-beam-program"
(Kernel.Program.load root ~evaluator:"karuta:beam" ~source:"not a term")
let suites () =