Update tests

This commit is contained in:
Pranav Gaddamadugu 2023-10-13 16:11:13 -04:00 committed by Pranav Gaddamadugu
parent 144ef44b8c
commit 630508c4ae
5 changed files with 10 additions and 8 deletions

View File

@ -242,7 +242,7 @@ impl Sample {
compiler.static_single_assignment_pass(&symbol_table).expect("failed to run ssa pass");
compiler.flattening_pass(&symbol_table).expect("failed to run flattener pass");
let start = Instant::now();
let out = compiler.destructuring_pass(&symbol_table);
let out = compiler.destructuring_pass();
let time = start.elapsed();
out.expect("failed to run destructurer pass");
time
@ -257,7 +257,7 @@ impl Sample {
let symbol_table = compiler.loop_unrolling_pass(symbol_table).expect("failed to run loop unrolling pass");
compiler.static_single_assignment_pass(&symbol_table).expect("failed to run ssa pass");
compiler.flattening_pass(&symbol_table).expect("failed to run flattener pass");
compiler.destructuring_pass(&symbol_table).expect("failed to run destructurer pass");
compiler.destructuring_pass().expect("failed to run destructurer pass");
let start = Instant::now();
let out = compiler.function_inlining_pass(&call_graph);
let time = start.elapsed();
@ -274,7 +274,7 @@ impl Sample {
let symbol_table = compiler.loop_unrolling_pass(symbol_table).expect("failed to run loop unrolling pass");
compiler.static_single_assignment_pass(&symbol_table).expect("failed to run ssa pass");
compiler.flattening_pass(&symbol_table).expect("failed to run flattener pass");
compiler.destructuring_pass(&symbol_table).expect("failed to run destructurer pass");
compiler.destructuring_pass().expect("failed to run destructurer pass");
compiler.function_inlining_pass(&call_graph).expect("failed to run inliner pass");
let start = Instant::now();
let out = compiler.dead_code_elimination_pass();
@ -292,7 +292,7 @@ impl Sample {
let symbol_table = compiler.loop_unrolling_pass(symbol_table).expect("failed to run loop unrolling pass");
compiler.static_single_assignment_pass(&symbol_table).expect("failed to run ssa pass");
compiler.flattening_pass(&symbol_table).expect("failed to run flattener pass");
compiler.destructuring_pass(&symbol_table).expect("failed to run destructurer pass");
compiler.destructuring_pass().expect("failed to run destructurer pass");
compiler.function_inlining_pass(&call_graph).expect("failed to run inliner pass");
compiler.dead_code_elimination_pass().expect("failed to run dce pass");
let start = Instant::now();
@ -314,7 +314,7 @@ impl Sample {
let symbol_table = compiler.loop_unrolling_pass(symbol_table).expect("failed to run loop unrolling pass");
compiler.static_single_assignment_pass(&symbol_table).expect("failed to run ssa pass");
compiler.flattening_pass(&symbol_table).expect("failed to run flattening pass");
compiler.destructuring_pass(&symbol_table).expect("failed to run destructuring pass");
compiler.destructuring_pass().expect("failed to run destructuring pass");
compiler.function_inlining_pass(&call_graph).expect("failed to run function inlining pass");
compiler.dead_code_elimination_pass().expect("failed to run dce pass");
compiler

View File

@ -13,10 +13,12 @@ program test.aleo {
}
function baz(a: [bool; 8]) -> bool {
assert(a[0u8]);
return true;
}
function qux(a: [bool; 8]) -> [bool; 8] {
assert(a[0u8]);
return a;
}
}

View File

@ -1,6 +1,6 @@
/*
namespace: Compile
expectation: Pass
expectation: Fail
*/
program test.aleo {

View File

@ -1,6 +1,6 @@
/*
namespace: Compile
expectation: Pass
expectation: Fail
*/
program test.aleo {

View File

@ -11,7 +11,7 @@ cases:
program test.aleo {
transition sum_manually(a: [u64; 4]) -> u64 {
return a[0] + a[1] + a[2] + a[3];
return a[0u8] + a[1u8] + a[2u8] + a[3u8];
}
transition sum_with_loop(a: [u64; 4]) -> u64 {