use std::path::{Path, PathBuf};
use std::process::Command;
fn pv_bin() -> PathBuf {
PathBuf::from(env!("CARGO_BIN_EXE_pv"))
}
fn fixture_path(name: &str) -> PathBuf {
Path::new(env!("CARGO_MANIFEST_DIR"))
.join("tests/fixtures")
.join(name)
}
fn run_equations(contract: &str, format: &str) -> String {
let output = Command::new(pv_bin())
.arg("equations")
.arg(fixture_path(contract))
.arg("--format")
.arg(format)
.output()
.expect("failed to run pv");
assert!(
output.status.success(),
"pv equations --format {format} failed for {contract}: {}",
String::from_utf8_lossy(&output.stderr)
);
String::from_utf8(output.stdout).unwrap()
}
include!("includes/ground_truth_golden.rs");
include!("includes/ground_truth_provability.rs");