Skip to content

Commit

Permalink
tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoGiachetta committed Sep 30, 2024
1 parent 32b62ea commit 2fc3258
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
6 changes: 3 additions & 3 deletions cairo1-run/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ keywords.workspace = true
cairo-vm = { workspace = true, features = ["std", "cairo-1-hints", "clap"] }
serde_json = { workspace = true }

cairo-lang-sierra-type-size = { version = "2.8.0", default-features = false }
cairo-lang-sierra-ap-change = { version = "2.8.0", default-features = false }
cairo-lang-sierra-gas = { version = "2.8.0", default-features = false }
cairo-lang-sierra-type-size = { version = "2.8.2", default-features = false }
cairo-lang-sierra-ap-change = { version = "2.8.2", default-features = false }
cairo-lang-sierra-gas = { version = "2.8.2", default-features = false }
cairo-lang-starknet-classes.workspace = true
cairo-lang-sierra-to-casm.workspace = true
cairo-lang-compiler.workspace = true
Expand Down
5 changes: 4 additions & 1 deletion cairo1-run/src/cairo_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -960,8 +960,11 @@ fn is_implicit_generic_id(generic_ty: &GenericTypeId) -> bool {
PedersenType::ID,
PoseidonType::ID,
RangeCheckType::ID,
RangeCheck96Type::ID,
SegmentArenaType::ID,
SystemType::ID,
MulModType::ID,
AddModType::ID,
]
.contains(generic_ty)
}
Expand Down Expand Up @@ -1156,9 +1159,9 @@ fn finalize_builtins(
"Pedersen" => BuiltinName::pedersen,
"Output" => BuiltinName::output,
"Ecdsa" => BuiltinName::ecdsa,
"RangeCheck96" => BuiltinName::range_check96,
"AddMod" => BuiltinName::add_mod,
"MulMod" => BuiltinName::mul_mod,
"RangeCheck96" => BuiltinName::range_check96,
_ => {
stack_pointer.offset += size as usize;
continue;
Expand Down
19 changes: 16 additions & 3 deletions cairo1-run/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct Args {
air_public_input: Option<PathBuf>,
#[clap(
long = "air_private_input",
requires_all = ["proof_mode", "trace_file", "memory_file"]
requires_all = ["proof_mode", "trace_file", "memory_file"]
)]
air_private_input: Option<PathBuf>,
#[clap(
Expand Down Expand Up @@ -424,8 +424,21 @@ mod tests {
Some("[17 18]"),
Some("[17 18]")
)]

fn test_run_progarm(
#[case(
"circuit.cairo",
"36699840570117848377038274035 72042528776886984408017100026 54251667697617050795983757117 7",
"[36699840570117848377038274035 72042528776886984408017100026 54251667697617050795983757117 7]",
None,
None
)]
// #[case(
// "circuit_failure.cairo",
// "",
// "",
// None,
// None
// )]
fn test_run_program(
#[case] program: &str,
#[case] expected_output: &str,
#[case] expected_serialized_output: &str,
Expand Down

0 comments on commit 2fc3258

Please sign in to comment.