@@ -2406,7 +2406,7 @@ mod tests {
24062406
24072407 #[ test]
24082408 fn discount_vsize ( ) {
2409- let tx: Transaction = hex_deserialize ! ( include_str!( "../tests/data/1in2out_pegin.hex" ) ) ;
2409+ let tx: Transaction = hex_deserialize ! ( include_str!( "../../ tests/data/1in2out_pegin.hex" ) ) ;
24102410 assert_eq ! ( tx. input. len( ) , 1 ) ;
24112411 assert ! ( tx. input[ 0 ] . is_pegin( ) ) ;
24122412 assert_eq ! ( tx. output. len( ) , 2 ) ;
@@ -2415,79 +2415,79 @@ mod tests {
24152415 assert_eq ! ( tx. discount_weight( ) , 2403 ) ;
24162416 assert_eq ! ( tx. discount_vsize( ) , 601 ) ;
24172417
2418- let tx: Transaction = hex_deserialize ! ( include_str!( "../tests/data/1in2out_tx.hex" ) ) ;
2418+ let tx: Transaction = hex_deserialize ! ( include_str!( "../../ tests/data/1in2out_tx.hex" ) ) ;
24192419 assert_eq ! ( tx. input. len( ) , 1 ) ;
24202420 assert_eq ! ( tx. output. len( ) , 2 ) ;
24212421 assert_eq ! ( tx. weight( ) , 5330 ) ;
24222422 assert_eq ! ( tx. vsize( ) , 1333 ) ;
24232423 assert_eq ! ( tx. discount_weight( ) , 863 ) ;
24242424 assert_eq ! ( tx. discount_vsize( ) , 216 ) ;
24252425
2426- let tx: Transaction = hex_deserialize ! ( include_str!( "../tests/data/1in3out_tx.hex" ) ) ;
2426+ let tx: Transaction = hex_deserialize ! ( include_str!( "../../ tests/data/1in3out_tx.hex" ) ) ;
24272427 assert_eq ! ( tx. input. len( ) , 1 ) ;
24282428 assert_eq ! ( tx. output. len( ) , 3 ) ;
24292429 assert_eq ! ( tx. weight( ) , 10107 ) ;
24302430 assert_eq ! ( tx. vsize( ) , 2527 ) ;
24312431 assert_eq ! ( tx. discount_weight( ) , 1173 ) ;
24322432 assert_eq ! ( tx. discount_vsize( ) , 294 ) ;
24332433
2434- let tx: Transaction = hex_deserialize ! ( include_str!( "../tests/data/2in3out_exp.hex" ) ) ;
2434+ let tx: Transaction = hex_deserialize ! ( include_str!( "../../ tests/data/2in3out_exp.hex" ) ) ;
24352435 assert_eq ! ( tx. input. len( ) , 2 ) ;
24362436 assert_eq ! ( tx. output. len( ) , 3 ) ;
24372437 assert_eq ! ( tx. weight( ) , 1302 ) ;
24382438 assert_eq ! ( tx. vsize( ) , 326 ) ;
24392439 assert_eq ! ( tx. discount_weight( ) , 1302 ) ;
24402440 assert_eq ! ( tx. discount_vsize( ) , 326 ) ;
24412441
2442- let tx: Transaction = hex_deserialize ! ( include_str!( "../tests/data/2in3out_tx.hex" ) ) ;
2442+ let tx: Transaction = hex_deserialize ! ( include_str!( "../../ tests/data/2in3out_tx.hex" ) ) ;
24432443 assert_eq ! ( tx. input. len( ) , 2 ) ;
24442444 assert_eq ! ( tx. output. len( ) , 3 ) ;
24452445 assert_eq ! ( tx. weight( ) , 10300 ) ;
24462446 assert_eq ! ( tx. vsize( ) , 2575 ) ;
24472447 assert_eq ! ( tx. discount_weight( ) , 1302 ) ;
24482448 assert_eq ! ( tx. discount_vsize( ) , 326 ) ;
24492449
2450- let tx: Transaction = hex_deserialize ! ( include_str!( "../tests/data/2in3out_tx.hex" ) ) ;
2450+ let tx: Transaction = hex_deserialize ! ( include_str!( "../../ tests/data/2in3out_tx.hex" ) ) ;
24512451 assert_eq ! ( tx. input. len( ) , 2 ) ;
24522452 assert_eq ! ( tx. output. len( ) , 3 ) ;
24532453 assert_eq ! ( tx. weight( ) , 10300 ) ;
24542454 assert_eq ! ( tx. vsize( ) , 2575 ) ;
24552455 assert_eq ! ( tx. discount_weight( ) , 1302 ) ;
24562456 assert_eq ! ( tx. discount_vsize( ) , 326 ) ;
24572457
2458- let tx: Transaction = hex_deserialize ! ( include_str!( "../tests/data/2in3out_tx2.hex" ) ) ;
2458+ let tx: Transaction = hex_deserialize ! ( include_str!( "../../ tests/data/2in3out_tx2.hex" ) ) ;
24592459 assert_eq ! ( tx. input. len( ) , 2 ) ;
24602460 assert_eq ! ( tx. output. len( ) , 3 ) ;
24612461 assert_eq ! ( tx. weight( ) , 10536 ) ;
24622462 assert_eq ! ( tx. vsize( ) , 2634 ) ;
24632463 assert_eq ! ( tx. discount_weight( ) , 1538 ) ;
24642464 assert_eq ! ( tx. discount_vsize( ) , 385 ) ;
24652465
2466- let tx: Transaction = hex_deserialize ! ( include_str!( "../tests/data/3in3out_tx.hex" ) ) ;
2466+ let tx: Transaction = hex_deserialize ! ( include_str!( "../../ tests/data/3in3out_tx.hex" ) ) ;
24672467 assert_eq ! ( tx. input. len( ) , 3 ) ;
24682468 assert_eq ! ( tx. output. len( ) , 3 ) ;
24692469 assert_eq ! ( tx. weight( ) , 10922 ) ;
24702470 assert_eq ! ( tx. vsize( ) , 2731 ) ;
24712471 assert_eq ! ( tx. discount_weight( ) , 1860 ) ;
24722472 assert_eq ! ( tx. discount_vsize( ) , 465 ) ;
24732473
2474- let tx: Transaction = hex_deserialize ! ( include_str!( "../tests/data/4in3out_tx.hex" ) ) ;
2474+ let tx: Transaction = hex_deserialize ! ( include_str!( "../../ tests/data/4in3out_tx.hex" ) ) ;
24752475 assert_eq ! ( tx. input. len( ) , 4 ) ;
24762476 assert_eq ! ( tx. output. len( ) , 3 ) ;
24772477 assert_eq ! ( tx. weight( ) , 11192 ) ;
24782478 assert_eq ! ( tx. vsize( ) , 2798 ) ;
24792479 assert_eq ! ( tx. discount_weight( ) , 2130 ) ;
24802480 assert_eq ! ( tx. discount_vsize( ) , 533 ) ;
24812481
2482- let tx: Transaction = hex_deserialize ! ( include_str!( "../tests/data/2in4out_tx.hex" ) ) ;
2482+ let tx: Transaction = hex_deserialize ! ( include_str!( "../../ tests/data/2in4out_tx.hex" ) ) ;
24832483 assert_eq ! ( tx. input. len( ) , 2 ) ;
24842484 assert_eq ! ( tx. output. len( ) , 4 ) ;
24852485 assert_eq ! ( tx. weight( ) , 15261 ) ;
24862486 assert_eq ! ( tx. vsize( ) , 3816 ) ;
24872487 assert_eq ! ( tx. discount_weight( ) , 1764 ) ;
24882488 assert_eq ! ( tx. discount_vsize( ) , 441 ) ;
24892489
2490- let tx: Transaction = hex_deserialize ! ( include_str!( "../tests/data/2in5out_tx.hex" ) ) ;
2490+ let tx: Transaction = hex_deserialize ! ( include_str!( "../../ tests/data/2in5out_tx.hex" ) ) ;
24912491 assert_eq ! ( tx. input. len( ) , 2 ) ;
24922492 assert_eq ! ( tx. output. len( ) , 5 ) ;
24932493 assert_eq ! ( tx. weight( ) , 20030 ) ;
@@ -2501,8 +2501,8 @@ mod tests {
25012501 // Check that rust-elements can deserialize tests vector from ELIP203
25022502 // from
25032503 // https://github.com/ElementsProject/ELIPs/blob/main/elip-0203.mediawiki
2504- let tx3: Transaction = hex_deserialize ! ( include_str!( "../tests/data/elip203_3.hex" ) ) ;
2505- let tx4: Transaction = hex_deserialize ! ( include_str!( "../tests/data/elip203_4.hex" ) ) ;
2504+ let tx3: Transaction = hex_deserialize ! ( include_str!( "../../ tests/data/elip203_3.hex" ) ) ;
2505+ let tx4: Transaction = hex_deserialize ! ( include_str!( "../../ tests/data/elip203_4.hex" ) ) ;
25062506 let max_money = 2_100_000_000_000_000 ;
25072507 assert ! ( tx3. input[ 0 ] . asset_issuance. amount. explicit( ) . unwrap( ) > max_money) ;
25082508 assert ! ( tx4. input[ 0 ] . asset_issuance. inflation_keys. explicit( ) . unwrap( ) > max_money) ;
@@ -2513,7 +2513,7 @@ mod tests {
25132513 use crate :: encode:: { serialize, deserialize} ;
25142514
25152515 // Start with a transaction that has a pegin.
2516- let base_tx: Transaction = hex_deserialize ! ( include_str!( "../tests/data/1in2out_pegin.hex" ) ) ;
2516+ let base_tx: Transaction = hex_deserialize ! ( include_str!( "../../ tests/data/1in2out_pegin.hex" ) ) ;
25172517
25182518 // Test case (a): input witnesses but no output witnesses
25192519 let mut tx_input_only = base_tx. clone ( ) ;
0 commit comments