mirror of
https://github.com/eth-act/ere.git
synced 2026-04-25 03:00:10 -04:00
Refactor docs and make Input API more explicit (#235)
This commit is contained in:
@@ -1 +0,0 @@
|
||||
pub use sha2::Sha256;
|
||||
@@ -84,7 +84,7 @@ impl<P: Program> Deref for ProgramTestCase<P> {
|
||||
|
||||
impl<P: Program> TestCase for ProgramTestCase<P> {
|
||||
fn input(&self) -> Input {
|
||||
Input::new(P::Io::serialize_input(&self.input).unwrap())
|
||||
Input::new().with_prefixed_stdin(P::Io::serialize_input(&self.input).unwrap())
|
||||
}
|
||||
|
||||
fn assert_output(&self, public_values: &[u8]) {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
pub mod guest;
|
||||
pub mod program;
|
||||
|
||||
#[cfg(feature = "host")]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use ere_io::Io;
|
||||
use ere_platform_trait::Platform;
|
||||
use ere_platform_trait::{OutputHashedPlatform, Platform};
|
||||
use sha2::Sha256;
|
||||
|
||||
pub mod basic;
|
||||
|
||||
@@ -16,4 +17,8 @@ pub trait Program {
|
||||
let output_bytes = Self::Io::serialize_output(&output).unwrap();
|
||||
P::write_whole_output(&output_bytes);
|
||||
}
|
||||
|
||||
fn run_output_sha256<P: Platform>() {
|
||||
Self::run::<OutputHashedPlatform<P, Sha256>>()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user