Fix Alloc error in send_3 test
@@ -12,15 +12,17 @@ mod with_tuple_destination;
#[test]
fn without_atom_pid_or_tuple_destination_errors_badarg() {
- with_process_arc(|arc_process| {
TestRunner::new(Config::with_source_file(file!()))
.run(
- &(
+ &strategy::process().prop_flat_map(|arc_process| {
+ (
+ Just(arc_process.clone()),
strategy::term::is_not_destination(arc_process.clone()),
strategy::term(arc_process.clone()),
- valid_options(arc_process.clone()),
- ),
- |(destination, message, options)| {
+ valid_options(arc_process),
+ )
+ }),
+ |(arc_process, destination, message, options)| {
prop_assert_eq!(
erlang::send_3(destination, message, options, &arc_process),
Err(badarg!().into())
@@ -30,7 +32,6 @@ fn without_atom_pid_or_tuple_destination_errors_badarg() {
},
)
.unwrap();
- });
}
fn valid_options(arc_process: Arc<ProcessControlBlock>) -> BoxedStrategy<Term> {
