mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-23 18:21:38 +03:00
Forgot to refactor in compiler tests
This commit is contained in:
parent
add64ae11a
commit
8695b11ce0
@ -31,7 +31,7 @@ use leo_compiler::{
|
||||
errors::CompilerError,
|
||||
targets::edwards_bls12::EdwardsGroupType,
|
||||
Output,
|
||||
TheoremOptions,
|
||||
AstSnapshotOptions,
|
||||
};
|
||||
|
||||
pub type EdwardsTestCompiler = Compiler<'static, Fq, EdwardsGroupType>;
|
||||
@ -43,7 +43,7 @@ pub(crate) fn make_test_context() -> AsgContext<'static> {
|
||||
new_context(allocator)
|
||||
}
|
||||
|
||||
fn new_compiler(path: PathBuf, theorem_options: Option<TheoremOptions>) -> EdwardsTestCompiler {
|
||||
fn new_compiler(path: PathBuf, theorem_options: Option<AstSnapshotOptions>) -> EdwardsTestCompiler {
|
||||
let program_name = "test".to_string();
|
||||
let output_dir = PathBuf::from("/tmp/output/");
|
||||
std::fs::create_dir_all(output_dir.clone()).unwrap();
|
||||
@ -69,7 +69,7 @@ fn hash(input: String) -> String {
|
||||
|
||||
pub(crate) fn parse_program(
|
||||
program_string: &str,
|
||||
theorem_options: Option<TheoremOptions>,
|
||||
theorem_options: Option<AstSnapshotOptions>,
|
||||
) -> Result<EdwardsTestCompiler, CompilerError> {
|
||||
let mut compiler = new_compiler("compiler-test".into(), theorem_options);
|
||||
|
||||
@ -117,7 +117,7 @@ impl Namespace for CompileNamespace {
|
||||
|
||||
let parsed = parse_program(
|
||||
&test.content,
|
||||
Some(TheoremOptions {
|
||||
Some(AstSnapshotOptions {
|
||||
initial: true,
|
||||
canonicalized: true,
|
||||
type_inferenced: true,
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "- Circuit has no constraints, use inputs and registers in program to produce them"
|
||||
- " --> compiler-test:8:1\n |\n 8 | function main() {\n 9 | ...\n 10 | }\n | ^\n |\n = a function named \"main\" already exists in this scope"
|
||||
|
Loading…
Reference in New Issue
Block a user