diff --git a/AGENTS.md b/AGENTS.md index 4ec096c..a633fe8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -307,6 +307,3 @@ For automated contributors specifically: - Integration tests stay in the crate's `tests/` directory. - OpenHuman's `scripts/externalize-inline-tests.mjs --write` moves inline test modules out mechanically; without `--write` it only reports. -- Existing `test.rs` and `_test.rs` files predate this rule. Rename each - to `_tests.rs` (keep its `mod` name, add the `#[path]` attribute) the - next time you touch it. diff --git a/crates/tinywallet-bus/src/lib.rs b/crates/tinywallet-bus/src/lib.rs index 73866e7..f76bb18 100644 --- a/crates/tinywallet-bus/src/lib.rs +++ b/crates/tinywallet-bus/src/lib.rs @@ -82,4 +82,5 @@ pub use tinywallet_crypto::{Chain, Error, Result}; pub use version::{CONTRACT_VERSION, is_compatible}; #[cfg(test)] +#[path = "lib_tests.rs"] mod test; diff --git a/crates/tinywallet-bus/src/test.rs b/crates/tinywallet-bus/src/lib_tests.rs similarity index 100% rename from crates/tinywallet-bus/src/test.rs rename to crates/tinywallet-bus/src/lib_tests.rs diff --git a/crates/tinywallet-bus/src/wire/mod.rs b/crates/tinywallet-bus/src/wire/mod.rs index 78a77d7..8ead679 100644 --- a/crates/tinywallet-bus/src/wire/mod.rs +++ b/crates/tinywallet-bus/src/wire/mod.rs @@ -284,6 +284,7 @@ pub struct Utxo { } #[cfg(test)] +#[path = "mod_tests.rs"] mod test; // --------------------------------------------------------------------------- diff --git a/crates/tinywallet-bus/src/wire/test.rs b/crates/tinywallet-bus/src/wire/mod_tests.rs similarity index 100% rename from crates/tinywallet-bus/src/wire/test.rs rename to crates/tinywallet-bus/src/wire/mod_tests.rs diff --git a/crates/tinywallet-crypto/src/address/btc.rs b/crates/tinywallet-crypto/src/address/btc.rs index 5178da9..5cb8778 100644 --- a/crates/tinywallet-crypto/src/address/btc.rs +++ b/crates/tinywallet-crypto/src/address/btc.rs @@ -290,4 +290,5 @@ fn wrong_network(address: &str, reason: &str) -> Error { } #[cfg(test)] +#[path = "btc/btc_tests.rs"] mod test; diff --git a/crates/tinywallet-crypto/src/address/btc/test.rs b/crates/tinywallet-crypto/src/address/btc/btc_tests.rs similarity index 100% rename from crates/tinywallet-crypto/src/address/btc/test.rs rename to crates/tinywallet-crypto/src/address/btc/btc_tests.rs diff --git a/crates/tinywallet-crypto/src/address/evm.rs b/crates/tinywallet-crypto/src/address/evm.rs index 52d79b3..bb6a2ca 100644 --- a/crates/tinywallet-crypto/src/address/evm.rs +++ b/crates/tinywallet-crypto/src/address/evm.rs @@ -174,4 +174,5 @@ fn prefixed(body: &str) -> String { } #[cfg(test)] +#[path = "evm/evm_tests.rs"] mod test; diff --git a/crates/tinywallet-crypto/src/address/evm/test.rs b/crates/tinywallet-crypto/src/address/evm/evm_tests.rs similarity index 100% rename from crates/tinywallet-crypto/src/address/evm/test.rs rename to crates/tinywallet-crypto/src/address/evm/evm_tests.rs diff --git a/crates/tinywallet-crypto/src/address/mod.rs b/crates/tinywallet-crypto/src/address/mod.rs index 3ca3de8..1ce78db 100644 --- a/crates/tinywallet-crypto/src/address/mod.rs +++ b/crates/tinywallet-crypto/src/address/mod.rs @@ -91,4 +91,5 @@ pub fn validate(chain: Chain, address: &str) -> Result { } #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-crypto/src/address/test.rs b/crates/tinywallet-crypto/src/address/mod_tests.rs similarity index 100% rename from crates/tinywallet-crypto/src/address/test.rs rename to crates/tinywallet-crypto/src/address/mod_tests.rs diff --git a/crates/tinywallet-crypto/src/address/solana.rs b/crates/tinywallet-crypto/src/address/solana.rs index 4c0f861..3b6030f 100644 --- a/crates/tinywallet-crypto/src/address/solana.rs +++ b/crates/tinywallet-crypto/src/address/solana.rs @@ -101,4 +101,5 @@ pub fn encode(bytes: &[u8; ADDRESS_BYTES]) -> String { } #[cfg(test)] +#[path = "solana/solana_tests.rs"] mod test; diff --git a/crates/tinywallet-crypto/src/address/solana/test.rs b/crates/tinywallet-crypto/src/address/solana/solana_tests.rs similarity index 100% rename from crates/tinywallet-crypto/src/address/solana/test.rs rename to crates/tinywallet-crypto/src/address/solana/solana_tests.rs diff --git a/crates/tinywallet-crypto/src/address/tron.rs b/crates/tinywallet-crypto/src/address/tron.rs index ab07b0a..11db152 100644 --- a/crates/tinywallet-crypto/src/address/tron.rs +++ b/crates/tinywallet-crypto/src/address/tron.rs @@ -144,4 +144,5 @@ pub fn encode(bytes: &[u8; ADDRESS_BYTES]) -> Result { } #[cfg(test)] +#[path = "tron/tron_tests.rs"] mod test; diff --git a/crates/tinywallet-crypto/src/address/tron/test.rs b/crates/tinywallet-crypto/src/address/tron/tron_tests.rs similarity index 100% rename from crates/tinywallet-crypto/src/address/tron/test.rs rename to crates/tinywallet-crypto/src/address/tron/tron_tests.rs diff --git a/crates/tinywallet-crypto/src/asset/mod.rs b/crates/tinywallet-crypto/src/asset/mod.rs index 8082cd9..edb37db 100644 --- a/crates/tinywallet-crypto/src/asset/mod.rs +++ b/crates/tinywallet-crypto/src/asset/mod.rs @@ -418,4 +418,5 @@ pub fn networks(solana: SolanaCluster) -> Vec { } #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-crypto/src/asset/test.rs b/crates/tinywallet-crypto/src/asset/mod_tests.rs similarity index 100% rename from crates/tinywallet-crypto/src/asset/test.rs rename to crates/tinywallet-crypto/src/asset/mod_tests.rs diff --git a/crates/tinywallet-crypto/src/chain/mod.rs b/crates/tinywallet-crypto/src/chain/mod.rs index f491bd1..34536df 100644 --- a/crates/tinywallet-crypto/src/chain/mod.rs +++ b/crates/tinywallet-crypto/src/chain/mod.rs @@ -98,4 +98,5 @@ impl FromStr for Chain { } #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-crypto/src/chain/test.rs b/crates/tinywallet-crypto/src/chain/mod_tests.rs similarity index 100% rename from crates/tinywallet-crypto/src/chain/test.rs rename to crates/tinywallet-crypto/src/chain/mod_tests.rs diff --git a/crates/tinywallet-crypto/src/error/mod.rs b/crates/tinywallet-crypto/src/error/mod.rs index df8f633..d4fd45d 100644 --- a/crates/tinywallet-crypto/src/error/mod.rs +++ b/crates/tinywallet-crypto/src/error/mod.rs @@ -98,4 +98,5 @@ pub enum Error { pub type Result = std::result::Result; #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-crypto/src/error/test.rs b/crates/tinywallet-crypto/src/error/mod_tests.rs similarity index 100% rename from crates/tinywallet-crypto/src/error/test.rs rename to crates/tinywallet-crypto/src/error/mod_tests.rs diff --git a/crates/tinywallet-crypto/src/rpc/mod.rs b/crates/tinywallet-crypto/src/rpc/mod.rs index b07d17d..1d47485 100644 --- a/crates/tinywallet-crypto/src/rpc/mod.rs +++ b/crates/tinywallet-crypto/src/rpc/mod.rs @@ -274,4 +274,5 @@ pub fn decode( } #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-crypto/src/rpc/test.rs b/crates/tinywallet-crypto/src/rpc/mod_tests.rs similarity index 100% rename from crates/tinywallet-crypto/src/rpc/test.rs rename to crates/tinywallet-crypto/src/rpc/mod_tests.rs diff --git a/crates/tinywallet-crypto/src/tx/proto.rs b/crates/tinywallet-crypto/src/tx/proto.rs index e33f346..a4d2935 100644 --- a/crates/tinywallet-crypto/src/tx/proto.rs +++ b/crates/tinywallet-crypto/src/tx/proto.rs @@ -208,5 +208,5 @@ fn take_exact<'a>(input: &mut &'a [u8], length: usize) -> Result<&'a [u8]> { } #[cfg(test)] -#[path = "proto/test.rs"] +#[path = "proto/proto_tests.rs"] mod test; diff --git a/crates/tinywallet-crypto/src/tx/proto/test.rs b/crates/tinywallet-crypto/src/tx/proto/proto_tests.rs similarity index 100% rename from crates/tinywallet-crypto/src/tx/proto/test.rs rename to crates/tinywallet-crypto/src/tx/proto/proto_tests.rs diff --git a/crates/tinywallet-module/src/service/mod.rs b/crates/tinywallet-module/src/service/mod.rs index 59dc2a1..426dc57 100644 --- a/crates/tinywallet-module/src/service/mod.rs +++ b/crates/tinywallet-module/src/service/mod.rs @@ -804,4 +804,5 @@ mod exports { } #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-module/src/service/test.rs b/crates/tinywallet-module/src/service/mod_tests.rs similarity index 100% rename from crates/tinywallet-module/src/service/test.rs rename to crates/tinywallet-module/src/service/mod_tests.rs diff --git a/crates/tinywallet-web3/src/crypto/abi/mod.rs b/crates/tinywallet-web3/src/crypto/abi/mod.rs index b49c735..6460b9f 100644 --- a/crates/tinywallet-web3/src/crypto/abi/mod.rs +++ b/crates/tinywallet-web3/src/crypto/abi/mod.rs @@ -52,4 +52,5 @@ fn flatten(error: &Error, to_address: &str, amount_raw: &str) -> String { } #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-web3/src/crypto/abi/test.rs b/crates/tinywallet-web3/src/crypto/abi/mod_tests.rs similarity index 100% rename from crates/tinywallet-web3/src/crypto/abi/test.rs rename to crates/tinywallet-web3/src/crypto/abi/mod_tests.rs diff --git a/crates/tinywallet-web3/src/crypto/chains/btc/mod.rs b/crates/tinywallet-web3/src/crypto/chains/btc/mod.rs index 0e572d9..58298fc 100644 --- a/crates/tinywallet-web3/src/crypto/chains/btc/mod.rs +++ b/crates/tinywallet-web3/src/crypto/chains/btc/mod.rs @@ -405,4 +405,5 @@ pub(crate) async fn lookup_tx(engine: &WalletEngine, hash: &str) -> Result Result Result, String> { } #[cfg(test)] +#[path = "validate/validate_tests.rs"] mod test; diff --git a/crates/tinywallet-web3/src/crypto/execution/validate/test.rs b/crates/tinywallet-web3/src/crypto/execution/validate/validate_tests.rs similarity index 100% rename from crates/tinywallet-web3/src/crypto/execution/validate/test.rs rename to crates/tinywallet-web3/src/crypto/execution/validate/validate_tests.rs diff --git a/crates/tinywallet-web3/src/crypto/service/mod.rs b/crates/tinywallet-web3/src/crypto/service/mod.rs index bddf1c7..7afd8dc 100644 --- a/crates/tinywallet-web3/src/crypto/service/mod.rs +++ b/crates/tinywallet-web3/src/crypto/service/mod.rs @@ -73,4 +73,5 @@ impl Web3Service { } #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-web3/src/crypto/service/test.rs b/crates/tinywallet-web3/src/crypto/service/mod_tests.rs similarity index 100% rename from crates/tinywallet-web3/src/crypto/service/test.rs rename to crates/tinywallet-web3/src/crypto/service/mod_tests.rs diff --git a/crates/tinywallet-web3/src/crypto/service/ops.rs b/crates/tinywallet-web3/src/crypto/service/ops.rs index 99c6939..bfa0aa0 100644 --- a/crates/tinywallet-web3/src/crypto/service/ops.rs +++ b/crates/tinywallet-web3/src/crypto/service/ops.rs @@ -260,4 +260,5 @@ impl Web3Service { } #[cfg(test)] +#[path = "ops/ops_tests.rs"] mod test; diff --git a/crates/tinywallet-web3/src/crypto/service/ops/test.rs b/crates/tinywallet-web3/src/crypto/service/ops/ops_tests.rs similarity index 100% rename from crates/tinywallet-web3/src/crypto/service/ops/test.rs rename to crates/tinywallet-web3/src/crypto/service/ops/ops_tests.rs diff --git a/crates/tinywallet-web3/src/crypto/wallet/mod.rs b/crates/tinywallet-web3/src/crypto/wallet/mod.rs index 941a4e3..ae6ac71 100644 --- a/crates/tinywallet-web3/src/crypto/wallet/mod.rs +++ b/crates/tinywallet-web3/src/crypto/wallet/mod.rs @@ -13,4 +13,5 @@ pub use engine::{WalletEngine, WalletSeams}; pub use types::{WalletAccount, WalletChain, WalletSetupSource, WalletStatus}; #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-web3/src/crypto/wallet/test.rs b/crates/tinywallet-web3/src/crypto/wallet/mod_tests.rs similarity index 100% rename from crates/tinywallet-web3/src/crypto/wallet/test.rs rename to crates/tinywallet-web3/src/crypto/wallet/mod_tests.rs diff --git a/crates/tinywallet-web3/src/quote/mod.rs b/crates/tinywallet-web3/src/quote/mod.rs index bd64a4d..dab263f 100644 --- a/crates/tinywallet-web3/src/quote/mod.rs +++ b/crates/tinywallet-web3/src/quote/mod.rs @@ -22,4 +22,5 @@ pub use tool::to_tool_result; pub use types::{QuoteOwner, Quoted, WALLET_NOT_CONFIGURED_MESSAGE}; #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-web3/src/quote/test.rs b/crates/tinywallet-web3/src/quote/mod_tests.rs similarity index 100% rename from crates/tinywallet-web3/src/quote/test.rs rename to crates/tinywallet-web3/src/quote/mod_tests.rs diff --git a/crates/tinywallet-web3/src/seams/mod.rs b/crates/tinywallet-web3/src/seams/mod.rs index 8d360c1..23a026a 100644 --- a/crates/tinywallet-web3/src/seams/mod.rs +++ b/crates/tinywallet-web3/src/seams/mod.rs @@ -39,4 +39,5 @@ impl QuoteScope for NoQuoteScope { } #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-web3/src/seams/test.rs b/crates/tinywallet-web3/src/seams/mod_tests.rs similarity index 100% rename from crates/tinywallet-web3/src/seams/test.rs rename to crates/tinywallet-web3/src/seams/mod_tests.rs diff --git a/crates/tinywallet-web3/src/test_support/logging.rs b/crates/tinywallet-web3/src/test_support/logging.rs index 72fe683..ad1309f 100644 --- a/crates/tinywallet-web3/src/test_support/logging.rs +++ b/crates/tinywallet-web3/src/test_support/logging.rs @@ -38,4 +38,5 @@ pub(crate) fn init() { } #[cfg(test)] +#[path = "logging/logging_tests.rs"] mod test; diff --git a/crates/tinywallet-web3/src/test_support/logging/test.rs b/crates/tinywallet-web3/src/test_support/logging/logging_tests.rs similarity index 100% rename from crates/tinywallet-web3/src/test_support/logging/test.rs rename to crates/tinywallet-web3/src/test_support/logging/logging_tests.rs diff --git a/crates/tinywallet-web3/src/tools/wallet/mod.rs b/crates/tinywallet-web3/src/tools/wallet/mod.rs index 933b384..487ea34 100644 --- a/crates/tinywallet-web3/src/tools/wallet/mod.rs +++ b/crates/tinywallet-web3/src/tools/wallet/mod.rs @@ -13,4 +13,5 @@ pub use status::WalletStatusTool; pub use tx_query::{WalletLookupTxTool, WalletTxReceiptTool, WalletTxStatusTool}; #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-web3/src/tools/wallet/test.rs b/crates/tinywallet-web3/src/tools/wallet/mod_tests.rs similarity index 100% rename from crates/tinywallet-web3/src/tools/wallet/test.rs rename to crates/tinywallet-web3/src/tools/wallet/mod_tests.rs diff --git a/crates/tinywallet-web3/src/tools/web3/mod.rs b/crates/tinywallet-web3/src/tools/web3/mod.rs index 61bcf8d..f637372 100644 --- a/crates/tinywallet-web3/src/tools/web3/mod.rs +++ b/crates/tinywallet-web3/src/tools/web3/mod.rs @@ -14,4 +14,5 @@ pub use dapp::{Web3DappCallTool, Web3DappExecuteTool}; pub use swap::{Web3SwapExecuteTool, Web3SwapQuoteTool, Web3SwapRoutesTool}; #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-web3/src/tools/web3/test.rs b/crates/tinywallet-web3/src/tools/web3/mod_tests.rs similarity index 100% rename from crates/tinywallet-web3/src/tools/web3/test.rs rename to crates/tinywallet-web3/src/tools/web3/mod_tests.rs diff --git a/crates/tinywallet-x402/src/abi/mod.rs b/crates/tinywallet-x402/src/abi/mod.rs index 93e8c09..718d935 100644 --- a/crates/tinywallet-x402/src/abi/mod.rs +++ b/crates/tinywallet-x402/src/abi/mod.rs @@ -150,4 +150,5 @@ fn keccak(bytes: &[u8]) -> [u8; 32] { } #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-x402/src/abi/test.rs b/crates/tinywallet-x402/src/abi/mod_tests.rs similarity index 100% rename from crates/tinywallet-x402/src/abi/test.rs rename to crates/tinywallet-x402/src/abi/mod_tests.rs diff --git a/crates/tinywallet-x402/src/crypto/mod.rs b/crates/tinywallet-x402/src/crypto/mod.rs index 85c90f1..07da4e9 100644 --- a/crates/tinywallet-x402/src/crypto/mod.rs +++ b/crates/tinywallet-x402/src/crypto/mod.rs @@ -53,4 +53,5 @@ pub(crate) fn fresh_nonce() -> [u8; 32] { } #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-x402/src/crypto/test.rs b/crates/tinywallet-x402/src/crypto/mod_tests.rs similarity index 100% rename from crates/tinywallet-x402/src/crypto/test.rs rename to crates/tinywallet-x402/src/crypto/mod_tests.rs diff --git a/crates/tinywallet-x402/src/eip712/mod.rs b/crates/tinywallet-x402/src/eip712/mod.rs index 643d6ba..5539eec 100644 --- a/crates/tinywallet-x402/src/eip712/mod.rs +++ b/crates/tinywallet-x402/src/eip712/mod.rs @@ -186,4 +186,5 @@ fn left_pad_address(address: Address20) -> [u8; 32] { } #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-x402/src/eip712/test.rs b/crates/tinywallet-x402/src/eip712/mod_tests.rs similarity index 100% rename from crates/tinywallet-x402/src/eip712/test.rs rename to crates/tinywallet-x402/src/eip712/mod_tests.rs diff --git a/crates/tinywallet-x402/src/ledger/mod.rs b/crates/tinywallet-x402/src/ledger/mod.rs index 0029f00..1100190 100644 --- a/crates/tinywallet-x402/src/ledger/mod.rs +++ b/crates/tinywallet-x402/src/ledger/mod.rs @@ -51,4 +51,5 @@ pub use types::{ }; #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-x402/src/ledger/test.rs b/crates/tinywallet-x402/src/ledger/mod_tests.rs similarity index 100% rename from crates/tinywallet-x402/src/ledger/test.rs rename to crates/tinywallet-x402/src/ledger/mod_tests.rs diff --git a/crates/tinywallet-x402/src/protocol/mod.rs b/crates/tinywallet-x402/src/protocol/mod.rs index 52315bc..32fc30d 100644 --- a/crates/tinywallet-x402/src/protocol/mod.rs +++ b/crates/tinywallet-x402/src/protocol/mod.rs @@ -33,4 +33,5 @@ pub use proxy::ProxyPolicy; pub(crate) const LOG_PREFIX: &str = "[x402]"; #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-x402/src/protocol/test.rs b/crates/tinywallet-x402/src/protocol/mod_tests.rs similarity index 100% rename from crates/tinywallet-x402/src/protocol/test.rs rename to crates/tinywallet-x402/src/protocol/mod_tests.rs diff --git a/crates/tinywallet-x402/src/thread/mod.rs b/crates/tinywallet-x402/src/thread/mod.rs index ba32f94..693dd65 100644 --- a/crates/tinywallet-x402/src/thread/mod.rs +++ b/crates/tinywallet-x402/src/thread/mod.rs @@ -31,4 +31,5 @@ impl ThreadScope for NoThread { } #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-x402/src/thread/test.rs b/crates/tinywallet-x402/src/thread/mod_tests.rs similarity index 100% rename from crates/tinywallet-x402/src/thread/test.rs rename to crates/tinywallet-x402/src/thread/mod_tests.rs diff --git a/crates/tinywallet-x402/src/tools/mod.rs b/crates/tinywallet-x402/src/tools/mod.rs index 915ddf0..9247ced 100644 --- a/crates/tinywallet-x402/src/tools/mod.rs +++ b/crates/tinywallet-x402/src/tools/mod.rs @@ -19,4 +19,5 @@ mod request; pub use request::X402RequestTool; #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/crates/tinywallet-x402/src/tools/test.rs b/crates/tinywallet-x402/src/tools/mod_tests.rs similarity index 100% rename from crates/tinywallet-x402/src/tools/test.rs rename to crates/tinywallet-x402/src/tools/mod_tests.rs diff --git a/crates/tinywallet-x402/src/wire/mod.rs b/crates/tinywallet-x402/src/wire/mod.rs index bfe632e..c6de106 100644 --- a/crates/tinywallet-x402/src/wire/mod.rs +++ b/crates/tinywallet-x402/src/wire/mod.rs @@ -40,6 +40,7 @@ mod assets; #[cfg(test)] +#[path = "mod_tests.rs"] mod test; mod types; diff --git a/crates/tinywallet-x402/src/wire/test.rs b/crates/tinywallet-x402/src/wire/mod_tests.rs similarity index 100% rename from crates/tinywallet-x402/src/wire/test.rs rename to crates/tinywallet-x402/src/wire/mod_tests.rs diff --git a/src/client/mod.rs b/src/client/mod.rs index 5b7357a..d4736f1 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -33,6 +33,7 @@ mod status; mod tron; #[cfg(test)] +#[path = "mod_tests.rs"] mod test; /// Errors raised by a chain query. diff --git a/src/client/test.rs b/src/client/mod_tests.rs similarity index 100% rename from src/client/test.rs rename to src/client/mod_tests.rs diff --git a/src/key/mod.rs b/src/key/mod.rs index 0239e83..f3a007d 100644 --- a/src/key/mod.rs +++ b/src/key/mod.rs @@ -245,4 +245,5 @@ fn seed_from_mnemonic(mnemonic: &str) -> Result>> { } #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/src/key/test.rs b/src/key/mod_tests.rs similarity index 100% rename from src/key/test.rs rename to src/key/mod_tests.rs diff --git a/src/tx/mod.rs b/src/tx/mod.rs index 12adb54..a1ff289 100644 --- a/src/tx/mod.rs +++ b/src/tx/mod.rs @@ -37,4 +37,5 @@ pub use tinywallet_crypto::tx::proto; pub use tinywallet_crypto::tx::{Error, Result}; #[cfg(test)] +#[path = "mod_tests.rs"] mod test; diff --git a/src/tx/test.rs b/src/tx/mod_tests.rs similarity index 100% rename from src/tx/test.rs rename to src/tx/mod_tests.rs