Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit a68e49a

Browse files
committed
Exclude functions in addition to atoms in raise_3 tests
3-tuples can start with an atom OR a function and still be valid, so bad atom module test needs to exclude functions too.
1 parent 069a652 commit a68e49a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

lumen_runtime/src/otp/erlang/tests/raise_3/with_atom_class.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,17 @@ fn with_class_with_stacktrace_without_atom_module_errors_badarg() {
8383
&(
8484
class(),
8585
strategy::term(arc_process.clone()),
86-
strategy::term::is_not_atom(arc_process.clone()),
86+
strategy::term(arc_process.clone()).prop_filter(
87+
"Module must not be an atom or function",
88+
|module| {
89+
!(
90+
// {M, F, arity | args}
91+
module.is_atom() ||
92+
// {function, args, location}
93+
module.is_function()
94+
)
95+
},
96+
),
8797
strategy::term::function::function(),
8898
strategy::term::function::arity_or_arguments(arc_process.clone()),
8999
),

0 commit comments

Comments
 (0)