Fix AllocErr in binary_part_2 test
@@ -6,14 +6,16 @@ mod with_tuple_with_arity_2;
#[test]
fn without_tuple_start_length_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_bitstring(arc_process.clone()),
- strategy::term::is_not_tuple(arc_process.clone()),
- ),
- |(binary, start_length)| {
+ strategy::term::is_not_tuple(arc_process),
+ )
+ }),
+ |(arc_process, binary, start_length)| {
prop_assert_eq!(
erlang::binary_part_2(binary, start_length, &arc_process),
Err(badarg!().into())
@@ -23,7 +25,6 @@ fn without_tuple_start_length_errors_badarg() {
},
)
.unwrap();
- });
}
#[test]
