@@ -3586,6 +3586,66 @@ forgetest!(inspect_custom_counter_method_identifiers, |prj, cmd| {
3586
3586
╰----------------------------+------------╯
3587
3587
3588
3588
3589
+ "# ] ] ) ;
3590
+ } ) ;
3591
+
3592
+ const CUSTOM_COUNTER_HUGE_METHOD_IDENTIFIERS : & str = r#"
3593
+ contract Counter {
3594
+ struct BigStruct {
3595
+ uint256 a;
3596
+ uint256 b;
3597
+ uint256 c;
3598
+ uint256 d;
3599
+ uint256 e;
3600
+ uint256 f;
3601
+ }
3602
+
3603
+ struct NestedBigStruct {
3604
+ BigStruct a;
3605
+ BigStruct b;
3606
+ BigStruct c;
3607
+ }
3608
+
3609
+ function hugeIdentifier(NestedBigStruct[] calldata _bigStructs, NestedBigStruct calldata _bigStruct) external {}
3610
+ }
3611
+ "# ;
3612
+
3613
+ forgetest ! ( inspect_custom_counter_very_huge_method_identifiers_unwrapped, |prj, cmd| {
3614
+ prj. add_source( "Counter.sol" , CUSTOM_COUNTER_HUGE_METHOD_IDENTIFIERS ) . unwrap( ) ;
3615
+
3616
+ cmd. args( [ "inspect" , "Counter" , "method-identifiers" ] ) . assert_success( ) . stdout_eq( str ![ [ r#"
3617
+
3618
+ ╭-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╮
3619
+ | Method | Identifier |
3620
+ +================================================================================================================================================================================================================================================================================================================================================+
3621
+ | hugeIdentifier(((uint256,uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256,uint256))[],((uint256,uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256,uint256))) | f38dafbb |
3622
+ ╰-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╯
3623
+
3624
+
3625
+ "# ] ] ) ;
3626
+ } ) ;
3627
+
3628
+ forgetest ! ( inspect_custom_counter_very_huge_method_identifiers_wrapped, |prj, cmd| {
3629
+ prj. add_source( "Counter.sol" , CUSTOM_COUNTER_HUGE_METHOD_IDENTIFIERS ) . unwrap( ) ;
3630
+
3631
+ // Force a specific terminal width to test wrapping
3632
+ cmd. args( [ "inspect" , "--wrap" , "Counter" , "method-identifiers" ] )
3633
+ . assert_with_terminal_width( 80 )
3634
+ . success( )
3635
+ . stdout_eq( str ![ [ r#"
3636
+
3637
+ ╭-----------------------------------------------------------------+------------╮
3638
+ | Method | Identifier |
3639
+ +==============================================================================+
3640
+ | hugeIdentifier(((uint256,uint256,uint256,uint256,uint256,uint25 | f38dafbb |
3641
+ | 6),(uint256,uint256,uint256,uint256,uint256,uint256),(uint256,u | |
3642
+ | int256,uint256,uint256,uint256,uint256))[],((uint256,uint256,ui | |
3643
+ | nt256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256 | |
3644
+ | ,uint256,uint256),(uint256,uint256,uint256,uint256,uint256,uint | |
3645
+ | 256))) | |
3646
+ ╰-----------------------------------------------------------------+------------╯
3647
+
3648
+
3589
3649
"# ] ] ) ;
3590
3650
} ) ;
3591
3651
0 commit comments