diff --git a/starknet/src/tests/proposal_validation_strategies/proposing_power.cairo b/starknet/src/tests/proposal_validation_strategies/proposing_power.cairo index f2eb2a64..0816a187 100644 --- a/starknet/src/tests/proposal_validation_strategies/proposing_power.cairo +++ b/starknet/src/tests/proposal_validation_strategies/proposing_power.cairo @@ -34,7 +34,7 @@ mod tests { #[test] #[available_gas(10000000000)] - fn test_vanilla_works() { + vanilla_works() { starknet::testing::set_block_timestamp(1); // deploy vanilla voting strategy @@ -107,7 +107,7 @@ mod tests { #[test] #[available_gas(10000000000)] - fn test_merkle_whitelist_works() { + merkle_whitelist_works() { starknet::testing::set_block_timestamp(1); // deploy merkle whitelist contract @@ -262,7 +262,7 @@ mod tests { #[test] #[available_gas(10000000000)] - fn test_erc20votes_works() { + erc20votes_works() { let SUPPLY = 100_u256; // deploy erc20 voting strategy diff --git a/starknet/src/tests/test_factory.cairo b/starknet/src/tests/test_factory.cairo index d6025530..4dc963ce 100644 --- a/starknet/src/tests/test_factory.cairo +++ b/starknet/src/tests/test_factory.cairo @@ -58,7 +58,7 @@ mod tests { #[test] #[available_gas(10000000000)] - fn test_deploy() { + deploy() { // Deploy Space let config = setup(); @@ -78,7 +78,7 @@ mod tests { #[test] #[available_gas(10000000000)] - fn test_deploy_reuse_salt() { + deploy_reuse_salt() { let mut constructor_calldata = array![]; let (factory_address, _) = deploy_syscall( diff --git a/starknet/src/tests/test_space.cairo b/starknet/src/tests/test_space.cairo index f809ca75..2755099d 100644 --- a/starknet/src/tests/test_space.cairo +++ b/starknet/src/tests/test_space.cairo @@ -31,7 +31,7 @@ mod tests { #[test] #[available_gas(100000000)] - fn test_initialize() { + initialize() { let deployer = contract_address_const::<0xdead>(); testing::set_caller_address(deployer); @@ -106,7 +106,7 @@ mod tests { #[test] #[available_gas(100000000)] #[should_panic(expected: ('Already Initialized', 'ENTRYPOINT_FAILED'))] - fn test_reinitialize() { + reinitialize() { let deployer = contract_address_const::<0xdead>(); testing::set_caller_address(deployer); @@ -198,7 +198,7 @@ mod tests { #[test] #[available_gas(10000000000)] - fn test__propose_update_vote_execute() { + fn propose_update_vote_execute() { let config = setup(); let (factory, space) = deploy(@config); @@ -291,7 +291,7 @@ mod tests { #[test] #[available_gas(10000000000)] #[should_panic(expected: ('Proposal is not valid', 'ENTRYPOINT_FAILED'))] - fn test__propose_failed_validation() { + fn propose_failed_validation() { let config = setup(); let (factory, space) = deploy(@config); let authenticator = IVanillaAuthenticatorDispatcher { @@ -409,7 +409,7 @@ mod tests { #[test] #[available_gas(10000000000)] #[should_panic(expected: ('Proposal has been finalized', 'ENTRYPOINT_FAILED'))] - fn test__cancel() { + fn cancel() { let relayer = contract_address_const::<0x1234>(); let config = setup(); let (factory, space) = deploy(@config); @@ -471,7 +471,7 @@ mod tests { #[test] #[available_gas(10000000000)] #[should_panic(expected: ('Zero Address', 'ENTRYPOINT_FAILED'))] - fn test_propose_zero_address() { + fn propose_zero_address() { let config = setup(); let (factory, space) = deploy(@config); @@ -508,7 +508,7 @@ mod tests { #[test] #[available_gas(10000000000)] #[should_panic(expected: ('Zero Address', 'ENTRYPOINT_FAILED'))] - fn test_update_zero_address() { + update_zero_address() { let config = setup(); let (factory, space) = deploy(@config); @@ -562,7 +562,7 @@ mod tests { #[test] #[available_gas(10000000000)] #[should_panic(expected: ('Zero Address', 'ENTRYPOINT_FAILED'))] - fn test_vote_zero_address() { + vote_zero_address() { let config = setup(); let (factory, space) = deploy(@config); diff --git a/starknet/src/tests/test_stark_tx_auth.cairo b/starknet/src/tests/test_stark_tx_auth.cairo index 565872e1..890f4bdd 100644 --- a/starknet/src/tests/test_stark_tx_auth.cairo +++ b/starknet/src/tests/test_stark_tx_auth.cairo @@ -47,7 +47,7 @@ mod tests { #[test] #[available_gas(10000000000)] - fn test_propose_update_vote() { + propose_update_vote() { let config = setup(); let (factory, space) = deploy(@config); let authenticator = setup_stark_tx_auth(space, config.owner); @@ -115,7 +115,7 @@ mod tests { #[test] #[available_gas(10000000000)] #[should_panic(expected: ('Invalid Caller', 'ENTRYPOINT_FAILED'))] - fn test_propose_invalid_caller() { + propose_invalid_caller() { let config = setup(); let (factory, space) = deploy(@config); let authenticator = setup_stark_tx_auth(space, config.owner); @@ -147,7 +147,7 @@ mod tests { #[test] #[available_gas(10000000000)] #[should_panic(expected: ('Invalid Caller', 'ENTRYPOINT_FAILED'))] - fn test_update_proposal_invalid_caller() { + update_proposal_invalid_caller() { let config = setup(); let (factory, space) = deploy(@config); let authenticator = setup_stark_tx_auth(space, config.owner); @@ -197,7 +197,7 @@ mod tests { #[test] #[available_gas(10000000000)] #[should_panic(expected: ('Invalid Caller', 'ENTRYPOINT_FAILED'))] - fn test_vote_invalid_caller() { + vote_invalid_caller() { let config = setup(); let (factory, space) = deploy(@config); let authenticator = setup_stark_tx_auth(space, config.owner); diff --git a/starknet/src/tests/test_upgrade.cairo b/starknet/src/tests/test_upgrade.cairo index a46ed4e6..fe2f7d31 100644 --- a/starknet/src/tests/test_upgrade.cairo +++ b/starknet/src/tests/test_upgrade.cairo @@ -39,7 +39,7 @@ mod tests { #[test] #[available_gas(10000000000)] - fn test_upgrade() { + upgrade() { let config = setup(); let (factory, space) = deploy(@config); @@ -58,7 +58,7 @@ mod tests { #[test] #[available_gas(10000000000)] - fn test_upgrade_via_execution_strategy() { + upgrade_via_execution_strategy() { let config = setup(); let (factory, space) = deploy(@config); let proposal_id = space.next_proposal_id(); @@ -116,7 +116,7 @@ mod tests { #[test] #[available_gas(10000000000)] #[should_panic(expected: ('Caller is not the owner', 'ENTRYPOINT_FAILED'))] - fn test_upgrade_unauthorized() { + upgrade_unauthorized() { let config = setup(); let (factory, space) = deploy(@config); diff --git a/starknet/src/tests/utils/strategy_trait.cairo b/starknet/src/tests/utils/strategy_trait.cairo index b1b3a47a..236598b0 100644 --- a/starknet/src/tests/utils/strategy_trait.cairo +++ b/starknet/src/tests/utils/strategy_trait.cairo @@ -3,12 +3,12 @@ use sx::types::Strategy; use starknet::{ContractAddress, contract_address_const}; trait StrategyTrait { - fn test_value() -> Strategy; + value() -> Strategy; fn from_address(addr: ContractAddress) -> Strategy; } impl StrategyImpl of StrategyTrait { - fn test_value() -> Strategy { + value() -> Strategy { Strategy { address: contract_address_const::<0x5c011>(), params: array![], } } diff --git a/starknet/src/types/proposal.cairo b/starknet/src/types/proposal.cairo index bd34d64d..89b65a0f 100644 --- a/starknet/src/types/proposal.cairo +++ b/starknet/src/types/proposal.cairo @@ -102,7 +102,7 @@ mod tests { use clone::Clone; #[test] - fn test_pack_zero() { + pack_zero() { let proposal = Proposal { start_timestamp: 0, min_end_timestamp: 0, @@ -122,7 +122,7 @@ mod tests { #[test] - fn test_pack_start_timestamp() { + pack_start_timestamp() { let proposal = Proposal { start_timestamp: 42, min_end_timestamp: 0, @@ -141,7 +141,7 @@ mod tests { } #[test] - fn test_pack_min_timestamp() { + pack_min_timestamp() { let proposal = Proposal { start_timestamp: 0, min_end_timestamp: 42, @@ -161,7 +161,7 @@ mod tests { #[test] - fn test_pack_max_timestamp() { + pack_max_timestamp() { let proposal = Proposal { start_timestamp: 0, min_end_timestamp: 0, @@ -182,7 +182,7 @@ mod tests { } #[test] - fn test_pack_finalization_status() { + pack_finalization_status() { let proposal = Proposal { start_timestamp: 0, min_end_timestamp: 0, @@ -204,7 +204,7 @@ mod tests { } #[test] - fn test_pack_full() { + pack_full() { let proposal = Proposal { start_timestamp: 0xffffffff, min_end_timestamp: 0xffffffff, diff --git a/starknet/src/types/user_address.cairo b/starknet/src/types/user_address.cairo index 3c632871..1e9d0a2f 100644 --- a/starknet/src/types/user_address.cairo +++ b/starknet/src/types/user_address.cairo @@ -84,14 +84,14 @@ mod tests { use starknet::{EthAddress, contract_address_const}; #[test] - fn test_is_zero() { + is_zero() { assert(UserAddress::Starknet(contract_address_const::<0>()).is_zero(), 'is not zero'); assert(UserAddress::Ethereum(EthAddress { address: 0 }).is_zero(), 'is not zero'); assert(UserAddress::Custom(0_u256).is_zero(), 'is not zero'); } #[test] - fn test_is_zero_false_positive() { + is_zero_false_positive() { assert( UserAddress::Starknet(contract_address_const::<1>()).is_zero() == false, 'false positive not zero' @@ -104,14 +104,14 @@ mod tests { } #[test] - fn test_is_non_zero() { + is_non_zero() { assert(UserAddress::Starknet(contract_address_const::<1>()).is_non_zero(), 'is zero'); assert(UserAddress::Ethereum(EthAddress { address: 1 }).is_non_zero(), 'is zero'); assert(UserAddress::Custom(1_u256).is_non_zero(), 'is zero'); } #[test] - fn test_is_non_zero_false_positive() { + is_non_zero_false_positive() { assert( UserAddress::Starknet(contract_address_const::<0>()).is_non_zero() == false, 'false positive is zero'