Use exceptions over result type in expect test

There's no need to hide stack traces since we turned them off
This commit is contained in:
Rudi Grinberg 2018-05-11 09:41:18 +07:00
parent a57013c3f3
commit f9f15ceacf
1 changed files with 4 additions and 2 deletions

View File

@ -161,8 +161,10 @@ Path.append (Path.of_string "/root") (Path.relative Path.build_dir "foo")
- : Stdune.Path.t = /root/_build/foo
|}]
try Ok (Path.rm_rf (Path.of_string "/does/not/exist/foo/bar/baz"))
with e -> Error e
Path.rm_rf (Path.of_string "/does/not/exist/foo/bar/baz")
[%%expect{|
Exception: Stdune__Exn.Code_error <abstr>.
|}]
[%%expect{|
- : (unit, exn) Stdune.result = Error (Stdune__Exn.Code_error _)
|}]