Skip to content

Commit

Permalink
Fix tests related to CompileError
Browse files Browse the repository at this point in the history
  • Loading branch information
Qqwy committed Oct 1, 2021
1 parent 466c65c commit 110936f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/type_check/builtin/implements_protocol_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ defmodule TypeCheck.Builtin.ImplementsProtocolTest do
def foo(_impl)
end

assert_raise(RuntimeError, "values of the type #TypeCheck.Type< impl(TypeCheck.Builtin.ImplementsProtocolTest.ThisProtocolIsNotConsolidated) > can only be generated when the protocol is consolidated.", fn ->
assert_raise(TypeCheck.CompileError, "values of the type #TypeCheck.Type< impl(TypeCheck.Builtin.ImplementsProtocolTest.ThisProtocolIsNotConsolidated) > can only be generated when the protocol is consolidated.", fn ->
TypeCheck.Protocols.ToStreamData.to_gen(impl(ThisProtocolIsNotConsolidated))
end)
end
Expand Down
2 changes: 1 addition & 1 deletion test/type_check/type_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ defmodule TypeCheck.TypeTest do
end

test "ensure_type! raises on non-types with a descriptive message" do
assert_raise(RuntimeError, ~r{^Invalid value passed to a function expecting a type!}, fn -> TypeCheck.Type.ensure_type!(42) end)
assert_raise(TypeCheck.CompileError, ~r{^Invalid value passed to a function expecting a type!}, fn -> TypeCheck.Type.ensure_type!(42) end)
end
end

0 comments on commit 110936f

Please sign in to comment.