Skip to content

Commit

Permalink
Merge pull request #212 from ralexstokes/clippy-lint
Browse files Browse the repository at this point in the history
fix clippy lint in test gen
  • Loading branch information
ralexstokes authored Aug 5, 2023
2 parents 56418ea + f9a66c2 commit 4001c62
Show file tree
Hide file tree
Showing 78 changed files with 1,121 additions and 2,331 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ use ssz_rs::prelude::*;
fn test_historical_root_accumulator() {
let mut test_case = HistoricalRootsUpdateTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/historical_roots_update/pyspec_tests/historical_root_accumulator");

test_case.execute(|state, context| spec::process_historical_roots_update(state, context));
test_case.execute(spec::process_historical_roots_update);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,131 +9,131 @@ use ssz_rs::prelude::*;
fn test_all_zero_inactivity_scores_empty_participation() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/all_zero_inactivity_scores_empty_participation");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_all_zero_inactivity_scores_empty_participation_leaking() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/all_zero_inactivity_scores_empty_participation_leaking");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_all_zero_inactivity_scores_full_participation() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/all_zero_inactivity_scores_full_participation");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_all_zero_inactivity_scores_full_participation_leaking() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/all_zero_inactivity_scores_full_participation_leaking");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_all_zero_inactivity_scores_random_participation() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/all_zero_inactivity_scores_random_participation");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_all_zero_inactivity_scores_random_participation_leaking() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/all_zero_inactivity_scores_random_participation_leaking");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_genesis() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/genesis");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_genesis_random_scores() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/genesis_random_scores");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_random_inactivity_scores_empty_participation() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/random_inactivity_scores_empty_participation");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_random_inactivity_scores_empty_participation_leaking() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/random_inactivity_scores_empty_participation_leaking");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_random_inactivity_scores_full_participation() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/random_inactivity_scores_full_participation");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_random_inactivity_scores_full_participation_leaking() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/random_inactivity_scores_full_participation_leaking");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_random_inactivity_scores_random_participation() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/random_inactivity_scores_random_participation");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_random_inactivity_scores_random_participation_leaking() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/random_inactivity_scores_random_participation_leaking");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_some_exited_full_random_leaking() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/some_exited_full_random_leaking");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_some_slashed_full_random() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/some_slashed_full_random");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_some_slashed_full_random_leaking() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/some_slashed_full_random_leaking");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_some_slashed_zero_scores_full_participation() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/some_slashed_zero_scores_full_participation");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}

#[test]
fn test_some_slashed_zero_scores_full_participation_leaking() {
let mut test_case = InactivityUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/some_slashed_zero_scores_full_participation_leaking");

test_case.execute(|state, context| spec::process_inactivity_updates(state, context));
test_case.execute(spec::process_inactivity_updates);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,78 +9,68 @@ use ssz_rs::prelude::*;
fn test_123_ok_support() {
let mut test_case = JustificationAndFinalizationTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/justification_and_finalization/pyspec_tests/123_ok_support");

test_case
.execute(|state, context| spec::process_justification_and_finalization(state, context));
test_case.execute(spec::process_justification_and_finalization);
}

#[test]
fn test_123_poor_support() {
let mut test_case = JustificationAndFinalizationTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/justification_and_finalization/pyspec_tests/123_poor_support");

test_case
.execute(|state, context| spec::process_justification_and_finalization(state, context));
test_case.execute(spec::process_justification_and_finalization);
}

#[test]
fn test_12_ok_support() {
let mut test_case = JustificationAndFinalizationTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/justification_and_finalization/pyspec_tests/12_ok_support");

test_case
.execute(|state, context| spec::process_justification_and_finalization(state, context));
test_case.execute(spec::process_justification_and_finalization);
}

#[test]
fn test_12_ok_support_messed_target() {
let mut test_case = JustificationAndFinalizationTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/justification_and_finalization/pyspec_tests/12_ok_support_messed_target");

test_case
.execute(|state, context| spec::process_justification_and_finalization(state, context));
test_case.execute(spec::process_justification_and_finalization);
}

#[test]
fn test_12_poor_support() {
let mut test_case = JustificationAndFinalizationTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/justification_and_finalization/pyspec_tests/12_poor_support");

test_case
.execute(|state, context| spec::process_justification_and_finalization(state, context));
test_case.execute(spec::process_justification_and_finalization);
}

#[test]
fn test_234_ok_support() {
let mut test_case = JustificationAndFinalizationTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/justification_and_finalization/pyspec_tests/234_ok_support");

test_case
.execute(|state, context| spec::process_justification_and_finalization(state, context));
test_case.execute(spec::process_justification_and_finalization);
}

#[test]
fn test_234_poor_support() {
let mut test_case = JustificationAndFinalizationTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/justification_and_finalization/pyspec_tests/234_poor_support");

test_case
.execute(|state, context| spec::process_justification_and_finalization(state, context));
test_case.execute(spec::process_justification_and_finalization);
}

#[test]
fn test_23_ok_support() {
let mut test_case = JustificationAndFinalizationTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/justification_and_finalization/pyspec_tests/23_ok_support");

test_case
.execute(|state, context| spec::process_justification_and_finalization(state, context));
test_case.execute(spec::process_justification_and_finalization);
}

#[test]
fn test_23_poor_support() {
let mut test_case = JustificationAndFinalizationTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/justification_and_finalization/pyspec_tests/23_poor_support");

test_case
.execute(|state, context| spec::process_justification_and_finalization(state, context));
test_case.execute(spec::process_justification_and_finalization);
}

#[test]
fn test_balance_threshold_with_exited_validators() {
let mut test_case = JustificationAndFinalizationTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/justification_and_finalization/pyspec_tests/balance_threshold_with_exited_validators");

test_case
.execute(|state, context| spec::process_justification_and_finalization(state, context));
test_case.execute(spec::process_justification_and_finalization);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,68 +9,68 @@ use ssz_rs::prelude::*;
fn test_all_zeroed() {
let mut test_case = ParticipationFlagUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/participation_flag_updates/pyspec_tests/all_zeroed");

test_case.execute(|state, context| spec::process_participation_flag_updates(state));
test_case.execute(|state, _| spec::process_participation_flag_updates(state));
}

#[test]
fn test_current_epoch_zeroed() {
let mut test_case = ParticipationFlagUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/participation_flag_updates/pyspec_tests/current_epoch_zeroed");

test_case.execute(|state, context| spec::process_participation_flag_updates(state));
test_case.execute(|state, _| spec::process_participation_flag_updates(state));
}

#[test]
fn test_current_filled() {
let mut test_case = ParticipationFlagUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/participation_flag_updates/pyspec_tests/current_filled");

test_case.execute(|state, context| spec::process_participation_flag_updates(state));
test_case.execute(|state, _| spec::process_participation_flag_updates(state));
}

#[test]
fn test_filled() {
let mut test_case = ParticipationFlagUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/participation_flag_updates/pyspec_tests/filled");

test_case.execute(|state, context| spec::process_participation_flag_updates(state));
test_case.execute(|state, _| spec::process_participation_flag_updates(state));
}

#[test]
fn test_previous_epoch_zeroed() {
let mut test_case = ParticipationFlagUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/participation_flag_updates/pyspec_tests/previous_epoch_zeroed");

test_case.execute(|state, context| spec::process_participation_flag_updates(state));
test_case.execute(|state, _| spec::process_participation_flag_updates(state));
}

#[test]
fn test_previous_filled() {
let mut test_case = ParticipationFlagUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/participation_flag_updates/pyspec_tests/previous_filled");

test_case.execute(|state, context| spec::process_participation_flag_updates(state));
test_case.execute(|state, _| spec::process_participation_flag_updates(state));
}

#[test]
fn test_random_0() {
let mut test_case = ParticipationFlagUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/participation_flag_updates/pyspec_tests/random_0");

test_case.execute(|state, context| spec::process_participation_flag_updates(state));
test_case.execute(|state, _| spec::process_participation_flag_updates(state));
}

#[test]
fn test_random_1() {
let mut test_case = ParticipationFlagUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/participation_flag_updates/pyspec_tests/random_1");

test_case.execute(|state, context| spec::process_participation_flag_updates(state));
test_case.execute(|state, _| spec::process_participation_flag_updates(state));
}

#[test]
fn test_random_2() {
let mut test_case = ParticipationFlagUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/participation_flag_updates/pyspec_tests/random_2");

test_case.execute(|state, context| spec::process_participation_flag_updates(state));
test_case.execute(|state, _| spec::process_participation_flag_updates(state));
}

#[test]
fn test_random_genesis() {
let mut test_case = ParticipationFlagUpdatesTestCase::<spec::BeaconState>::from("../consensus-spec-tests/tests/mainnet/altair/epoch_processing/participation_flag_updates/pyspec_tests/random_genesis");

test_case.execute(|state, context| spec::process_participation_flag_updates(state));
test_case.execute(|state, _| spec::process_participation_flag_updates(state));
}
Loading

0 comments on commit 4001c62

Please sign in to comment.