@@ -72,8 +72,24 @@ describe('Multi-Contract-Debugging tests', () => {
72
72
} ) ;
73
73
} ) ;
74
74
75
- it . todo ( 'should not log statements that are not executed' ) ; // Maybe this is already included in tests above
76
- it . todo ( 'should still work with different instances of the same contract, with different paths due to different contract parameter values' ) ;
75
+ it ( 'should still work with different instances of the same contract, with different paths due to different contract parameter values' , ( ) => {
76
+ const sameNameDifferentPathContract1 = new Contract ( ARTIFACT_SAME_NAME_DIFFERENT_PATH , [ 0n ] , { provider } ) ;
77
+ const sameNameDifferentPathContract2 = new Contract ( ARTIFACT_SAME_NAME_DIFFERENT_PATH , [ 1n ] , { provider } ) ;
78
+
79
+ const sameNameDifferentPathContract1Utxo = randomUtxo ( ) ;
80
+ const sameNameDifferentPathContract2Utxo = randomUtxo ( ) ;
81
+
82
+ ( provider as any ) ?. addUtxo ( sameNameDifferentPathContract1 . address , sameNameDifferentPathContract1Utxo ) ;
83
+ ( provider as any ) ?. addUtxo ( sameNameDifferentPathContract2 . address , sameNameDifferentPathContract2Utxo ) ;
84
+
85
+ const tx = new TransactionBuilder ( { provider } )
86
+ . addInput ( sameNameDifferentPathContract1Utxo , sameNameDifferentPathContract1 . unlock . function_1 ( 0n ) )
87
+ . addInput ( sameNameDifferentPathContract2Utxo , sameNameDifferentPathContract2 . unlock . function_1 ( 1n ) )
88
+ . addOutput ( { to : sameNameDifferentPathContract1 . address , amount : sameNameDifferentPathContract1Utxo . satoshis } )
89
+ . addOutput ( { to : sameNameDifferentPathContract2 . address , amount : sameNameDifferentPathContract2Utxo . satoshis } ) ;
90
+
91
+ expect ( tx ) . toLog ( 'SameNameDifferentPath.cash:5 a is 0\nSameNameDifferentPath.cash:8 a is not 0' ) ;
92
+ } ) ;
77
93
} ) ;
78
94
79
95
describe ( 'require statements' , ( ) => {
0 commit comments