Skip to content

Commit 3b2363b

Browse files
committed
Merge rust-bitcoin#3846: Remove test_ prefix from unit tests
85e0431 Remove test_ prefix from unit tests (Tobin C. Harding) Pull request description: There is a loose convention in Rust to not use `test_` prefix. The reason being that `cargo test` outputs 'test <test name>' using the prefix makes the output stutter. This patch smells a bit like code-churn but having the prefix in some places and not others is confusing to new contributors and is leading me to explain this many times now. Lets just fix it. Remove the prefix unless doing so breaks the code. ACKs for top commit: shinghim: ACK 85e0431 apoelstra: ACK 85e0431; successfully ran local tests Tree-SHA512: d90ae5ef75cc5e5a8f43f60819544f1a447f13cbe660ba71e84b8f27bfcc04a11d3afde0ed56e4eea5c73ebc3925024b800a1b995f73142cab892f97a414f14a
2 parents dddb63f + 85e0431 commit 3b2363b

File tree

22 files changed

+95
-95
lines changed

22 files changed

+95
-95
lines changed

base58/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ mod tests {
258258
use super::*;
259259

260260
#[test]
261-
fn test_base58_encode() {
261+
fn base58_encode() {
262262
// Basics
263263
assert_eq!(&encode(&[0][..]), "1");
264264
assert_eq!(&encode(&[1][..]), "2");
@@ -287,7 +287,7 @@ mod tests {
287287
}
288288

289289
#[test]
290-
fn test_base58_decode() {
290+
fn base58_decode() {
291291
// Basics
292292
assert_eq!(decode("1").ok(), Some(vec![0u8]));
293293
assert_eq!(decode("2").ok(), Some(vec![1u8]));
@@ -308,7 +308,7 @@ mod tests {
308308
}
309309

310310
#[test]
311-
fn test_base58_roundtrip() {
311+
fn base58_roundtrip() {
312312
let s = "xprv9wTYmMFdV23N2TdNG573QoEsfRrWKQgWeibmLntzniatZvR9BmLnvSxqu53Kw1UmYPxLgboyZQaXwTCg8MSY3H2EU4pWcQDnRnrVA1xe8fs";
313313
let v: Vec<u8> = decode_check(s).unwrap();
314314
assert_eq!(encode_check(&v[..]), s);

bitcoin/src/address/mod.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ mod tests {
941941
}
942942

943943
#[test]
944-
fn test_p2pkh_address_58() {
944+
fn p2pkh_address_58() {
945945
let hash = "162c5ea71c0b23f5b9022ef047c4a86470a5b070".parse::<PubkeyHash>().unwrap();
946946
let addr = Address::p2pkh(hash, NetworkKind::Main);
947947

@@ -955,7 +955,7 @@ mod tests {
955955
}
956956

957957
#[test]
958-
fn test_p2pkh_from_key() {
958+
fn p2pkh_from_key() {
959959
let key = "048d5141948c1702e8c95f438815794b87f706a8d4cd2bffad1dc1570971032c9b6042a0431ded2478b5c9cf2d81c124a5e57347a3c63ef0e7716cf54d613ba183".parse::<PublicKey>().unwrap();
960960
let addr = Address::p2pkh(key, NetworkKind::Main);
961961
assert_eq!(&addr.to_string(), "1QJVDzdqb1VpbDK7uDeyVXy9mR27CJiyhY");
@@ -970,7 +970,7 @@ mod tests {
970970
}
971971

972972
#[test]
973-
fn test_p2sh_address_58() {
973+
fn p2sh_address_58() {
974974
let hash = "162c5ea71c0b23f5b9022ef047c4a86470a5b070".parse::<ScriptHash>().unwrap();
975975
let addr = Address::p2sh_from_hash(hash, NetworkKind::Main);
976976

@@ -984,7 +984,7 @@ mod tests {
984984
}
985985

986986
#[test]
987-
fn test_p2sh_parse() {
987+
fn p2sh_parse() {
988988
let script = ScriptBuf::from_hex("552103a765fc35b3f210b95223846b36ef62a4e53e34e2925270c2c7906b92c9f718eb2103c327511374246759ec8d0b89fa6c6b23b33e11f92c5bc155409d86de0c79180121038cae7406af1f12f4786d820a1466eec7bc5785a1b5e4a387eca6d797753ef6db2103252bfb9dcaab0cd00353f2ac328954d791270203d66c2be8b430f115f451b8a12103e79412d42372c55dd336f2eb6eb639ef9d74a22041ba79382c74da2338fe58ad21035049459a4ebc00e876a9eef02e72a3e70202d3d1f591fc0dd542f93f642021f82102016f682920d9723c61b27f562eb530c926c00106004798b6471e8c52c60ee02057ae").unwrap();
989989
let addr = Address::p2sh(&script, NetworkKind::Test).unwrap();
990990
assert_eq!(&addr.to_string(), "2N3zXjbwdTcPsJiy8sUK9FhWJhqQCxA8Jjr");
@@ -993,7 +993,7 @@ mod tests {
993993
}
994994

995995
#[test]
996-
fn test_p2sh_parse_for_large_script() {
996+
fn p2sh_parse_for_large_script() {
997997
let script = ScriptBuf::from_hex("552103a765fc35b3f210b95223846b36ef62a4e53e34e2925270c2c7906b92c9f718eb2103c327511374246759ec8d0b89fa6c6b23b33e11f92c5bc155409d86de0c79180121038cae7406af1f12f4786d820a1466eec7bc5785a1b5e4a387eca6d797753ef6db2103252bfb9dcaab0cd00353f2ac328954d791270203d66c2be8b430f115f451b8a12103e79412d42372c55dd336f2eb6eb639ef9d74a22041ba79382c74da2338fe58ad21035049459a4ebc00e876a9eef02e72a3e70202d3d1f591fc0dd542f93f642021f82102016f682920d9723c61b27f562eb530c926c00106004798b6471e8c52c60ee02057ae12123122313123123ac1231231231231313123131231231231313212313213123123552103a765fc35b3f210b95223846b36ef62a4e53e34e2925270c2c7906b92c9f718eb2103c327511374246759ec8d0b89fa6c6b23b33e11f92c5bc155409d86de0c79180121038cae7406af1f12f4786d820a1466eec7bc5785a1b5e4a387eca6d797753ef6db2103252bfb9dcaab0cd00353f2ac328954d791270203d66c2be8b430f115f451b8a12103e79412d42372c55dd336f2eb6eb639ef9d74a22041ba79382c74da2338fe58ad21035049459a4ebc00e876a9eef02e72a3e70202d3d1f591fc0dd542f93f642021f82102016f682920d9723c61b27f562eb530c926c00106004798b6471e8c52c60ee02057ae12123122313123123ac1231231231231313123131231231231313212313213123123552103a765fc35b3f210b95223846b36ef62a4e53e34e2925270c2c7906b92c9f718eb2103c327511374246759ec8d0b89fa6c6b23b33e11f92c5bc155409d86de0c79180121038cae7406af1f12f4786d820a1466eec7bc5785a1b5e4a387eca6d797753ef6db2103252bfb9dcaab0cd00353f2ac328954d791270203d66c2be8b430f115f451b8a12103e79412d42372c55dd336f2eb6eb639ef9d74a22041ba79382c74da2338fe58ad21035049459a4ebc00e876a9eef02e72a3e70202d3d1f591fc0dd542f93f642021f82102016f682920d9723c61b27f562eb530c926c00106004798b6471e8c52c60ee02057ae12123122313123123ac1231231231231313123131231231231313212313213123123").unwrap();
998998
assert_eq!(
999999
Address::p2sh(&script, NetworkKind::Test),
@@ -1002,7 +1002,7 @@ mod tests {
10021002
}
10031003

10041004
#[test]
1005-
fn test_p2wpkh() {
1005+
fn p2wpkh() {
10061006
// stolen from Bitcoin transaction: b3c8c2b6cfc335abbcb2c7823a8453f55d64b2b5125a9a61e8737230cdb8ce20
10071007
let key = "033bc8c83c52df5712229a2f72206d90192366c36428cb0c12b6af98324d97bfbc"
10081008
.parse::<CompressedPublicKey>()
@@ -1014,7 +1014,7 @@ mod tests {
10141014
}
10151015

10161016
#[test]
1017-
fn test_p2wsh() {
1017+
fn p2wsh() {
10181018
// stolen from Bitcoin transaction 5df912fda4becb1c29e928bec8d64d93e9ba8efa9b5b405bd683c86fd2c65667
10191019
let script = ScriptBuf::from_hex("52210375e00eb72e29da82b89367947f29ef34afb75e8654f6ea368e0acdfd92976b7c2103a1b26313f430c4b15bb1fdce663207659d8cac749a0e53d70eff01874496feff2103c96d495bfdd5ba4145e3e046fee45e84a8a48ad05bd8dbb395c011a32cf9f88053ae").unwrap();
10201020
let addr = Address::p2wsh(&script, KnownHrp::Mainnet).expect("script is valid");
@@ -1027,7 +1027,7 @@ mod tests {
10271027
}
10281028

10291029
#[test]
1030-
fn test_p2shwpkh() {
1030+
fn p2shwpkh() {
10311031
// stolen from Bitcoin transaction: ad3fd9c6b52e752ba21425435ff3dd361d6ac271531fc1d2144843a9f550ad01
10321032
let key = "026c468be64d22761c30cd2f12cbc7de255d592d7904b1bab07236897cc4c2e766"
10331033
.parse::<CompressedPublicKey>()
@@ -1039,7 +1039,7 @@ mod tests {
10391039
}
10401040

10411041
#[test]
1042-
fn test_p2shwsh() {
1042+
fn p2shwsh() {
10431043
// stolen from Bitcoin transaction f9ee2be4df05041d0e0a35d7caa3157495ca4f93b233234c9967b6901dacf7a9
10441044
let script = ScriptBuf::from_hex("522103e5529d8eaa3d559903adb2e881eb06c86ac2574ffa503c45f4e942e2a693b33e2102e5f10fcdcdbab211e0af6a481f5532536ec61a5fdbf7183770cf8680fe729d8152ae").unwrap();
10451045
let addr = Address::p2shwsh(&script, NetworkKind::Main).expect("script is valid");
@@ -1049,7 +1049,7 @@ mod tests {
10491049
}
10501050

10511051
#[test]
1052-
fn test_non_existent_segwit_version() {
1052+
fn non_existent_segwit_version() {
10531053
// 40-byte program
10541054
let program = hex!(
10551055
"654f6ea368e0acdfd92976b7c2103a1b26313f430654f6ea368e0acdfd92976b7c2103a1b26313f4"
@@ -1061,7 +1061,7 @@ mod tests {
10611061
}
10621062

10631063
#[test]
1064-
fn test_address_debug() {
1064+
fn address_debug() {
10651065
// This is not really testing output of Debug but the ability and proper functioning
10661066
// of Debug derivation on structs generic in NetworkValidation.
10671067
#[derive(Debug)]
@@ -1085,7 +1085,7 @@ mod tests {
10851085
}
10861086

10871087
#[test]
1088-
fn test_address_type() {
1088+
fn address_type() {
10891089
let addresses = [
10901090
("1QJVDzdqb1VpbDK7uDeyVXy9mR27CJiyhY", Some(AddressType::P2pkh)),
10911091
("33iFwdLuRpW1uK1RTRqsoi8rR4NpDzk66k", Some(AddressType::P2sh)),
@@ -1116,7 +1116,7 @@ mod tests {
11161116

11171117
#[test]
11181118
#[cfg(feature = "serde")]
1119-
fn test_json_serialize() {
1119+
fn json_serialize() {
11201120
use serde_json;
11211121

11221122
let addr =
@@ -1198,7 +1198,7 @@ mod tests {
11981198
}
11991199

12001200
#[test]
1201-
fn test_qr_string() {
1201+
fn qr_string() {
12021202
for el in
12031203
["132F25rTsvBdp9JzLLBHP5mvGY66i1xdiM", "33iFwdLuRpW1uK1RTRqsoi8rR4NpDzk66k"].iter()
12041204
{
@@ -1238,7 +1238,7 @@ mod tests {
12381238
}
12391239

12401240
#[test]
1241-
fn test_is_related_to_pubkey_p2wpkh() {
1241+
fn is_related_to_pubkey_p2wpkh() {
12421242
let address_string = "bc1qhvd6suvqzjcu9pxjhrwhtrlj85ny3n2mqql5w4";
12431243
let address = address_string
12441244
.parse::<Address<_>>()
@@ -1259,7 +1259,7 @@ mod tests {
12591259
}
12601260

12611261
#[test]
1262-
fn test_is_related_to_pubkey_p2shwpkh() {
1262+
fn is_related_to_pubkey_p2shwpkh() {
12631263
let address_string = "3EZQk4F8GURH5sqVMLTFisD17yNeKa7Dfs";
12641264
let address = address_string
12651265
.parse::<Address<_>>()
@@ -1280,7 +1280,7 @@ mod tests {
12801280
}
12811281

12821282
#[test]
1283-
fn test_is_related_to_pubkey_p2pkh() {
1283+
fn is_related_to_pubkey_p2pkh() {
12841284
let address_string = "1J4LVanjHMu3JkXbVrahNuQCTGCRRgfWWx";
12851285
let address = address_string
12861286
.parse::<Address<_>>()
@@ -1301,7 +1301,7 @@ mod tests {
13011301
}
13021302

13031303
#[test]
1304-
fn test_is_related_to_pubkey_p2pkh_uncompressed_key() {
1304+
fn is_related_to_pubkey_p2pkh_uncompressed_key() {
13051305
let address_string = "msvS7KzhReCDpQEJaV2hmGNvuQqVUDuC6p";
13061306
let address = address_string
13071307
.parse::<Address<_>>()
@@ -1322,7 +1322,7 @@ mod tests {
13221322
}
13231323

13241324
#[test]
1325-
fn test_is_related_to_pubkey_p2tr() {
1325+
fn is_related_to_pubkey_p2tr() {
13261326
let pubkey_string = "0347ff3dacd07a1f43805ec6808e801505a6e18245178609972a68afbc2777ff2b";
13271327
let pubkey = pubkey_string.parse::<PublicKey>().expect("pubkey");
13281328
let xonly_pubkey = XOnlyPublicKey::from(pubkey.inner);
@@ -1348,7 +1348,7 @@ mod tests {
13481348
}
13491349

13501350
#[test]
1351-
fn test_is_related_to_xonly_pubkey() {
1351+
fn is_related_to_xonly_pubkey() {
13521352
let pubkey_string = "0347ff3dacd07a1f43805ec6808e801505a6e18245178609972a68afbc2777ff2b";
13531353
let pubkey = pubkey_string.parse::<PublicKey>().expect("pubkey");
13541354
let xonly_pubkey = XOnlyPublicKey::from(pubkey.inner);
@@ -1369,7 +1369,7 @@ mod tests {
13691369
}
13701370

13711371
#[test]
1372-
fn test_fail_address_from_script() {
1372+
fn fail_address_from_script() {
13731373
use crate::witness_program;
13741374

13751375
let bad_p2wpkh = ScriptBuf::from_hex("0014dbc5b0a8f9d4353b4b54c3db48846bb15abfec").unwrap();
@@ -1403,7 +1403,7 @@ mod tests {
14031403
}
14041404

14051405
#[test]
1406-
fn test_matches_script_pubkey() {
1406+
fn matches_script_pubkey() {
14071407
let addresses = [
14081408
"1QJVDzdqb1VpbDK7uDeyVXy9mR27CJiyhY",
14091409
"1J4LVanjHMu3JkXbVrahNuQCTGCRRgfWWx",

bitcoin/src/bip152.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ mod test {
443443
}
444444

445445
#[test]
446-
fn test_header_and_short_ids_from_block() {
446+
fn header_and_short_ids_from_block() {
447447
let block = dummy_block();
448448

449449
let compact = HeaderAndShortIds::from_block(&block, 42, 2, &[]).unwrap();
@@ -463,7 +463,7 @@ mod test {
463463
}
464464

465465
#[test]
466-
fn test_compact_block_vector() {
466+
fn compact_block_vector() {
467467
// Tested with Elements implementation of compact blocks.
468468
let raw_block = Vec::<u8>::from_hex("000000206c750a364035aefd5f81508a08769975116d9195312ee4520dceac39e1fdc62c4dc67473b8e354358c1e610afeaff7410858bd45df43e2940f8a62bd3d5e3ac943c2975cffff7f200000000002020000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff04016b0101ffffffff020006062a0100000001510000000000000000266a24aa21a9ed4a3d9f3343dafcc0d6f6d4310f2ee5ce273ed34edca6c75db3a73e7f368734200120000000000000000000000000000000000000000000000000000000000000000000000000020000000001021fc20ba2bd745507b8e00679e3b362558f9457db374ca28ffa5243f4c23a4d5f00000000171600147c9dea14ffbcaec4b575e03f05ceb7a81cd3fcbffdffffff915d689be87b43337f42e26033df59807b768223368f189a023d0242d837768900000000171600147c9dea14ffbcaec4b575e03f05ceb7a81cd3fcbffdffffff0200cdf5050000000017a9146803c72d9154a6a20f404bed6d3dcee07986235a8700e1f5050000000017a9144e6a4c7cb5b5562904843bdf816342f4db9f5797870247304402205e9bf6e70eb0e4b495bf483fd8e6e02da64900f290ef8aaa64bb32600d973c450220670896f5d0e5f33473e5f399ab680cc1d25c2d2afd15abd722f04978f28be887012103e4e4d9312b2261af508b367d8ba9be4f01b61d6d6e78bec499845b4f410bcf2702473044022045ac80596a6ac9c8c572f94708709adaf106677221122e08daf8b9741a04f66a022003ccd52a3b78f8fd08058fc04fc0cffa5f4c196c84eae9e37e2a85babe731b57012103e4e4d9312b2261af508b367d8ba9be4f01b61d6d6e78bec499845b4f410bcf276a000000").unwrap();
469469
let raw_compact = Vec::<u8>::from_hex("000000206c750a364035aefd5f81508a08769975116d9195312ee4520dceac39e1fdc62c4dc67473b8e354358c1e610afeaff7410858bd45df43e2940f8a62bd3d5e3ac943c2975cffff7f2000000000a4df3c3744da89fa010a6979e971450100020000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff04016b0101ffffffff020006062a0100000001510000000000000000266a24aa21a9ed4a3d9f3343dafcc0d6f6d4310f2ee5ce273ed34edca6c75db3a73e7f368734200120000000000000000000000000000000000000000000000000000000000000000000000000").unwrap();
@@ -478,7 +478,7 @@ mod test {
478478
}
479479

480480
#[test]
481-
fn test_getblocktx_differential_encoding_de_and_serialization() {
481+
fn getblocktx_differential_encoding_de_and_serialization() {
482482
let testcases = vec![
483483
// differentially encoded VarInts, indicies
484484
(vec![4, 0, 5, 1, 10], vec![0, 6, 8, 19]),
@@ -523,7 +523,7 @@ mod test {
523523
#[test]
524524
#[cfg(debug_assertions)]
525525
#[should_panic] // 'attempt to add with overflow' in consensus_encode()
526-
fn test_getblocktx_panic_when_encoding_u64_max() {
526+
fn getblocktx_panic_when_encoding_u64_max() {
527527
serialize(&BlockTransactionsRequest {
528528
block_hash: BlockHash::from_byte_array([0; 32]),
529529
indexes: vec![u64::MAX],

bitcoin/src/bip158.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ mod test {
582582
use crate::ScriptBuf;
583583

584584
#[test]
585-
fn test_blockfilters() {
585+
fn blockfilters() {
586586
// test vectors from: https://github.com/jimpo/bitcoin/blob/c7efb652f3543b001b4dd22186a354605b14f47e/src/test/data/blockfilters.json
587587
let data = include_str!("../tests/data/blockfilters.json");
588588

@@ -649,7 +649,7 @@ mod test {
649649
}
650650

651651
#[test]
652-
fn test_filter() {
652+
fn filter() {
653653
let mut patterns = BTreeSet::new();
654654

655655
patterns.insert(hex!("000000"));
@@ -718,7 +718,7 @@ mod test {
718718
}
719719

720720
#[test]
721-
fn test_bit_stream() {
721+
fn bit_stream() {
722722
let mut out = Vec::new();
723723
{
724724
let mut writer = BitStreamWriter::new(&mut out);

bitcoin/src/bip32.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ mod tests {
974974
use super::*;
975975

976976
#[test]
977-
fn test_parse_derivation_path() {
977+
fn parse_derivation_path() {
978978
assert_eq!("n/0'/0".parse::<DerivationPath>(), Err(Error::InvalidChildNumberFormat));
979979
assert_eq!("4/m/5".parse::<DerivationPath>(), Err(Error::InvalidChildNumberFormat));
980980
assert_eq!("//3/0'".parse::<DerivationPath>(), Err(Error::InvalidChildNumberFormat));
@@ -1036,7 +1036,7 @@ mod tests {
10361036
}
10371037

10381038
#[test]
1039-
fn test_derivation_path_conversion_index() {
1039+
fn derivation_path_conversion_index() {
10401040
let path = "0h/1/2'".parse::<DerivationPath>().unwrap();
10411041
let numbers: Vec<ChildNumber> = path.clone().into();
10421042
let path2: DerivationPath = numbers.into();
@@ -1096,7 +1096,7 @@ mod tests {
10961096
}
10971097

10981098
#[test]
1099-
fn test_increment() {
1099+
fn increment() {
11001100
let idx = 9345497; // randomly generated, I promise
11011101
let cn = ChildNumber::from_normal_idx(idx).unwrap();
11021102
assert_eq!(cn.increment().ok(), Some(ChildNumber::from_normal_idx(idx + 1).unwrap()));
@@ -1139,7 +1139,7 @@ mod tests {
11391139
}
11401140

11411141
#[test]
1142-
fn test_vector_1() {
1142+
fn vector_1() {
11431143
let secp = Secp256k1::new();
11441144
let seed = hex!("000102030405060708090a0b0c0d0e0f");
11451145

@@ -1175,7 +1175,7 @@ mod tests {
11751175
}
11761176

11771177
#[test]
1178-
fn test_vector_2() {
1178+
fn vector_2() {
11791179
let secp = Secp256k1::new();
11801180
let seed = hex!("fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542");
11811181

@@ -1211,7 +1211,7 @@ mod tests {
12111211
}
12121212

12131213
#[test]
1214-
fn test_vector_3() {
1214+
fn vector_3() {
12151215
let secp = Secp256k1::new();
12161216
let seed = hex!("4b381541583be4423346c643850da4b320e46a87ae3d2a4e6da11eba819cd4acba45d239319ac14f863b8d5ab5a0d0c64d2e8a1e7d1457df2e5a3c51c73235be");
12171217

bitcoin/src/blockdata/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ mod tests {
508508
}
509509

510510
#[test]
511-
fn test_coinbase_and_bip34() {
511+
fn coinbase_and_bip34() {
512512
// testnet block 100,000
513513
const BLOCK_HEX: &str = "0200000035ab154183570282ce9afc0b494c9fc6a3cfea05aa8c1add2ecc56490000000038ba3d78e4500a5a7570dbe61960398add4410d278b21cd9708e6d9743f374d544fc055227f1001c29c1ea3b0101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff3703a08601000427f1001c046a510100522cfabe6d6d0000000000000000000068692066726f6d20706f6f6c7365727665726aac1eeeed88ffffffff0100f2052a010000001976a914912e2b234f941f30b18afbb4fa46171214bf66c888ac00000000";
514514
let block: Block = deserialize(&hex!(BLOCK_HEX)).unwrap();

bitcoin/src/blockdata/script/tests.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ macro_rules! unwrap_all {
591591
}
592592

593593
#[test]
594-
fn test_iterator() {
594+
fn iterator() {
595595
let zero = ScriptBuf::from_hex("00").unwrap();
596596
let zeropush = ScriptBuf::from_hex("0100").unwrap();
597597

@@ -669,7 +669,7 @@ fn script_ord() {
669669

670670
#[test]
671671
#[cfg(feature = "bitcoinconsensus")]
672-
fn test_bitcoinconsensus() {
672+
fn bitcoinconsensus() {
673673
use crate::consensus_validation::ScriptExt as _;
674674

675675
// a random SegWit transaction from the blockchain using native SegWit
@@ -707,7 +707,7 @@ fn default_dust_value() {
707707
}
708708

709709
#[test]
710-
fn test_script_get_sigop_count() {
710+
fn script_get_sigop_count() {
711711
assert_eq!(
712712
Builder::new()
713713
.push_opcode(OP_DUP)
@@ -784,7 +784,7 @@ fn test_script_get_sigop_count() {
784784

785785
#[test]
786786
#[cfg(feature = "serde")]
787-
fn test_script_serde_human_and_not() {
787+
fn script_serde_human_and_not() {
788788
let script = ScriptBuf::from(vec![0u8, 1u8, 2u8]);
789789

790790
// Serialize
@@ -799,7 +799,7 @@ fn test_script_serde_human_and_not() {
799799
}
800800

801801
#[test]
802-
fn test_instructions_are_fused() {
802+
fn instructions_are_fused() {
803803
let script = ScriptBuf::new();
804804
let mut instructions = script.instructions();
805805
assert!(instructions.next().is_none());

0 commit comments

Comments
 (0)