-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b91e953
commit dad6fac
Showing
3 changed files
with
29 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
//! This integration test aims to check that the `nargo codegen-verifier` will successfully create a | ||
//! file containing a verifier for a simple program. | ||
use assert_cmd::prelude::*; | ||
use predicates::prelude::*; | ||
use std::process::Command; | ||
// use assert_cmd::prelude::*; | ||
// use predicates::prelude::*; | ||
// use std::process::Command; | ||
|
||
use assert_fs::prelude::{PathAssert, PathChild}; | ||
// use assert_fs::prelude::{PathAssert, PathChild}; | ||
|
||
#[test] | ||
fn simple_verifier_codegen() { | ||
let test_dir = assert_fs::TempDir::new().unwrap(); | ||
std::env::set_current_dir(&test_dir).unwrap(); | ||
// #[test] | ||
// fn simple_verifier_codegen() { | ||
// let test_dir = assert_fs::TempDir::new().unwrap(); | ||
// std::env::set_current_dir(&test_dir).unwrap(); | ||
|
||
// Create trivial program | ||
let project_name = "hello_world"; | ||
let project_dir = test_dir.child(project_name); | ||
// // Create trivial program | ||
// let project_name = "hello_world"; | ||
// let project_dir = test_dir.child(project_name); | ||
|
||
let mut cmd = Command::cargo_bin("nargo").unwrap(); | ||
cmd.arg("new").arg(project_name); | ||
cmd.assert().success(); | ||
// let mut cmd = Command::cargo_bin("nargo").unwrap(); | ||
// cmd.arg("new").arg(project_name); | ||
// cmd.assert().success(); | ||
|
||
std::env::set_current_dir(&project_dir).unwrap(); | ||
// std::env::set_current_dir(&project_dir).unwrap(); | ||
|
||
// Run `nargo codegen-verifier` | ||
let mut cmd = Command::cargo_bin("nargo").unwrap(); | ||
cmd.arg("codegen-verifier"); | ||
cmd.assert() | ||
.success() | ||
.stdout(predicate::str::contains("Contract successfully created and located at")); | ||
// // Run `nargo codegen-verifier` | ||
// let mut cmd = Command::cargo_bin("nargo").unwrap(); | ||
// cmd.arg("codegen-verifier"); | ||
// cmd.assert() | ||
// .success() | ||
// .stdout(predicate::str::contains("Contract successfully created and located at")); | ||
|
||
project_dir.child("contract").child("plonk_vk.sol").assert(predicate::path::is_file()); | ||
} | ||
// project_dir.child("contract").child("plonk_vk.sol").assert(predicate::path::is_file()); | ||
// } |