Skip to content

Instantly share code, notes, and snippets.

@tomasaschan
Last active August 29, 2015 14:00
Show Gist options
  • Select an option

  • Save tomasaschan/11319815 to your computer and use it in GitHub Desktop.

Select an option

Save tomasaschan/11319815 to your computer and use it in GitHub Desktop.
using Base.Test
nonfatal_handler(r::Test.Success) = Test.default_handler(r)
function nonfatal_handler(r::Test.Failure)
print_with_color(:red, "Test FAILED: $(r.expr)")
println()
end
function nonfatal_handler(r::Test.Error)
print_with_color(:red, "ERROR during test: $(r.expr)")
println()
end
Test.with_handler(nonfatal_handler) do
@test 2 == 3
@test 2 == 2
@test 4 < 3
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment