Skip to content

Commit

Permalink
Generate 3 random words for the 1st test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nenad committed Aug 1, 2024
1 parent 9f3f790 commit a2ed992
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions listings/applications/coin_flip/src/tests.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn deploy() -> (ICoinFlipDispatcher, IRandomnessDispatcher, IERC20Dispatcher, Co

#[test]
#[fuzzer(runs: 10, seed: 22)]
fn test_two_flips(random_word: felt252) {
fn test_two_flips(random_word_1: felt252, random_word_2: felt252, random_word_3: felt252) {
let (coin_flip, randomness, eth, deployer) = deploy();

// fund the CoinFlip contract
Expand All @@ -52,13 +52,13 @@ fn test_two_flips(random_word: felt252) {
stop_cheat_caller_address(eth.contract_address);

_flip_request(
coin_flip, randomness, eth, deployer, 0, CoinFlip::CALLBACK_FEE_LIMIT / 5 * 3, random_word
coin_flip, randomness, eth, deployer, 0, CoinFlip::CALLBACK_FEE_LIMIT / 5 * 3, random_word_1
);
_flip_request(
coin_flip, randomness, eth, deployer, 1, CoinFlip::CALLBACK_FEE_LIMIT / 4 * 3, random_word
coin_flip, randomness, eth, deployer, 1, CoinFlip::CALLBACK_FEE_LIMIT / 4 * 3, random_word_2
);
_flip_request(
coin_flip, randomness, eth, deployer, 2, CoinFlip::CALLBACK_FEE_LIMIT, random_word
coin_flip, randomness, eth, deployer, 2, CoinFlip::CALLBACK_FEE_LIMIT, random_word_3
);
}

Expand Down

0 comments on commit a2ed992

Please sign in to comment.