@@ -487,55 +487,57 @@ fn with_mfa_with_positive_line_raises() {
487
487
488
488
#[ test]
489
489
fn with_mfa_with_file_and_line_raises ( ) {
490
- with_process_arc ( |arc_process| {
491
- TestRunner :: new ( Config :: with_source_file ( file ! ( ) ) )
492
- . run (
493
- & (
490
+ TestRunner :: new ( Config :: with_source_file ( file ! ( ) ) )
491
+ . run (
492
+ & strategy:: process ( ) . prop_flat_map ( |arc_process| {
493
+ (
494
+ Just ( arc_process. clone ( ) ) ,
494
495
class_variant_and_term ( ) ,
495
496
strategy:: term ( arc_process. clone ( ) ) ,
496
497
strategy:: term:: atom ( ) ,
497
498
strategy:: term:: atom ( ) ,
498
499
strategy:: term:: function:: arity_or_arguments ( arc_process. clone ( ) ) ,
499
500
strategy:: term:: charlist ( arc_process. clone ( ) ) ,
500
- strategy:: term:: integer:: positive ( arc_process. clone ( ) ) ,
501
- ) ,
502
- |(
503
- ( class_variant, class) ,
504
- reason,
505
- module,
506
- function,
507
- arity_or_arguments,
508
- file_value,
509
- line_value,
510
- ) | {
511
- let file_key = atom_unchecked ( "file" ) ;
512
- let line_key = atom_unchecked ( "line" ) ;
513
- let location = arc_process
514
- . list_from_slice ( & [
515
- arc_process
516
- . tuple_from_slice ( & [ file_key, file_value] )
517
- . unwrap ( ) ,
518
- arc_process
519
- . tuple_from_slice ( & [ line_key, line_value] )
520
- . unwrap ( ) ,
521
- ] )
522
- . unwrap ( ) ;
523
- let stacktrace = arc_process
524
- . list_from_slice ( & [ arc_process
525
- . tuple_from_slice ( & [ module, function, arity_or_arguments, location] )
526
- . unwrap ( ) ] )
527
- . unwrap ( ) ;
528
-
529
- prop_assert_eq ! (
530
- erlang:: raise_3( class, reason, stacktrace) ,
531
- Err ( raise!( class_variant, reason, Some ( stacktrace) ) . into( ) )
532
- ) ;
533
-
534
- Ok ( ( ) )
535
- } ,
536
- )
537
- . unwrap ( ) ;
538
- } ) ;
501
+ strategy:: term:: integer:: positive ( arc_process) ,
502
+ )
503
+ } ) ,
504
+ |(
505
+ arc_process,
506
+ ( class_variant, class) ,
507
+ reason,
508
+ module,
509
+ function,
510
+ arity_or_arguments,
511
+ file_value,
512
+ line_value,
513
+ ) | {
514
+ let file_key = atom_unchecked ( "file" ) ;
515
+ let line_key = atom_unchecked ( "line" ) ;
516
+ let location = arc_process
517
+ . list_from_slice ( & [
518
+ arc_process
519
+ . tuple_from_slice ( & [ file_key, file_value] )
520
+ . unwrap ( ) ,
521
+ arc_process
522
+ . tuple_from_slice ( & [ line_key, line_value] )
523
+ . unwrap ( ) ,
524
+ ] )
525
+ . unwrap ( ) ;
526
+ let stacktrace = arc_process
527
+ . list_from_slice ( & [ arc_process
528
+ . tuple_from_slice ( & [ module, function, arity_or_arguments, location] )
529
+ . unwrap ( ) ] )
530
+ . unwrap ( ) ;
531
+
532
+ prop_assert_eq ! (
533
+ erlang:: raise_3( class, reason, stacktrace) ,
534
+ Err ( raise!( class_variant, reason, Some ( stacktrace) ) . into( ) )
535
+ ) ;
536
+
537
+ Ok ( ( ) )
538
+ } ,
539
+ )
540
+ . unwrap ( ) ;
539
541
}
540
542
541
543
fn class ( ) -> BoxedStrategy < Term > {
0 commit comments