Skip to content

Commit

Permalink
Relax assert
Browse files Browse the repository at this point in the history
  • Loading branch information
ushitora-anqou committed Sep 29, 2023
1 parent 5fb115f commit ffedddf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/verifier.ml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ let verify_notes ?(print = true) pool notes =
| Assert sql -> (
match Datastore.(query (prepare con sql) []) with
| Error msg -> failwithf "Error !assert: %s\n" msg
| Ok [] | Ok [ [ Null ] ] -> ()
| Ok [ [ Int s ] ] ->
if s = 1 then () else failwithf "Assertion failed: %s" sql
| _ -> failwith "Error !assert: invalid result"));
Expand Down

0 comments on commit ffedddf

Please sign in to comment.