Skip to content

Commit

Permalink
unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
ctian1 committed Nov 26, 2024
1 parent 3544004 commit e07f8f3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1534,4 +1534,14 @@ pub mod tests {
setup_logger();
test_e2e_with_deferred_proofs_prover::<DefaultProverComponents>(SP1ProverOpts::default())
}

#[test]
fn test_deterministic_setup() {
setup_logger();
let prover = SP1Prover::<DefaultProverComponents>::new();
let program = test_artifacts::FIBONACCI_ELF;
let (pk, vk) = prover.setup(&program);

Check failure on line 1543 in crates/prover/src/lib.rs

View workflow job for this annotation

GitHub Actions / Formatting & Clippy

unused variable: `vk`

Check failure on line 1543 in crates/prover/src/lib.rs

View workflow job for this annotation

GitHub Actions / Formatting & Clippy

this expression creates a reference which is immediately dereferenced by the compiler

Check warning on line 1543 in crates/prover/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test (x86-64)

unused variable: `vk`

Check warning on line 1543 in crates/prover/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test (x86-64)

unused variable: `vk`
let pk2 = prover.setup(&program).0;

Check failure on line 1544 in crates/prover/src/lib.rs

View workflow job for this annotation

GitHub Actions / Formatting & Clippy

this expression creates a reference which is immediately dereferenced by the compiler
assert_eq!(pk.pk.commit, pk2.pk.commit);
}
}

0 comments on commit e07f8f3

Please sign in to comment.