Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Assert =
- let Throws<'a when 'a :> exn> f =
- let wasThrown = ref false
- try f () with :? 'a -> wasThrown := true
- Assert.IsTrue (!wasThrown, sprintf "%s expected, but not thrown." typeof<'a>.Name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement