Skip to content

Commit

Permalink
Revert deleted files
Browse files Browse the repository at this point in the history
  • Loading branch information
Owliie authored and Dimo99 committed Oct 23, 2023
1 parent 443be9c commit 58f8d95
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions casper-finality-proofs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[[bin]]
name = "weigh_justification_and_finalization"
path = "bin/weigh_justification_and_finalization.rs"

[[bin]]
name = "test_engine"
path = "src/test_engine/bin/main.rs"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
2 changes: 2 additions & 0 deletions casper-finality-proofs/src/test_engine/TestEngine.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ The test engine is a tool for running unit tests for plonky2 circuits.
}
```

To add a test which is expected to fail on a circuit level, name the JSON file with a trailing `_fail.json`. The test engine will expect the circuit to fail and will mark the test as successful if it does.

- ### Wrappers
To test a circuit, create a wrapper in `src/test_engine/wrappers/`. It represents a function that writes input data to the circuit and asserts its outputs. It uses `TestData` data to assert that the circuit is working correctly.

Expand Down
1 change: 0 additions & 1 deletion casper-finality-proofs/src/test_engine/utils/parse_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use serde::Deserialize;
use std::fs::File;
use std::io::Read;

#[allow(dead_code)] // We allow dead_code since this is used in tests
pub fn read_fixture<T: for<'a> Deserialize<'a>>(filename: &str) -> T {
let mut file = File::open(filename).unwrap();
let mut context = String::new();
Expand Down

0 comments on commit 58f8d95

Please sign in to comment.