mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-23 18:21:38 +03:00
circuits
This commit is contained in:
parent
8464c5b9d2
commit
71486fb628
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
a: u8,
|
||||
|
||||
@ -10,4 +15,4 @@ function main() {
|
||||
let f = Foo { a: 0u8 };
|
||||
|
||||
console.assert(1u8 == f.use_a());
|
||||
}
|
||||
}
|
||||
|
@ -15,4 +15,4 @@ function main() {
|
||||
let f = Foo { a: 0u8 };
|
||||
|
||||
f.set_a(1u8);
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,27 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
inputs:
|
||||
- func_circ.in: |
|
||||
[main]
|
||||
a: u32 = 100;
|
||||
|
||||
[registers]
|
||||
r0: bool = false;
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
a: u32,
|
||||
}
|
||||
|
||||
circuit Bar {
|
||||
function bar() {
|
||||
const f = Foo { a: 0u32 };
|
||||
function bar(a: u32) -> u32 {
|
||||
const f = Foo { a: a };
|
||||
return f.a;
|
||||
}
|
||||
}
|
||||
|
||||
function main() {
|
||||
const b = Bar::bar();
|
||||
}
|
||||
function main(a: u32) -> bool {
|
||||
const b = Bar::bar(a);
|
||||
return a == b;
|
||||
}
|
||||
|
@ -1,13 +1,18 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
circuit Bar {
|
||||
b2: u32
|
||||
|
||||
function add_five(z:u32) -> u32 {
|
||||
return z+5u32;
|
||||
function add_five(z: u32) -> u32 {
|
||||
return z + 5u32;
|
||||
}
|
||||
}
|
||||
|
||||
function main () {
|
||||
const Bar = 66u32;
|
||||
const k1 = Bar{ b2: 30u32 };
|
||||
const k1 = Bar { b2: 30u32 };
|
||||
const k2 = Bar::add_five(55u32);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,20 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
inputs:
|
||||
- inline.in: |
|
||||
[main]
|
||||
x: u32 = 100;
|
||||
|
||||
[registers]
|
||||
r0: u32 = 0;
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
x: u32
|
||||
}
|
||||
|
||||
function main() {
|
||||
const a = Foo { x: 1u32 };
|
||||
}
|
||||
function main(x: u32) -> u32 {
|
||||
const a = Foo { x: x };
|
||||
return a.x;
|
||||
}
|
||||
|
@ -1,7 +1,13 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
x: u32
|
||||
}
|
||||
|
||||
function main() {
|
||||
// no member y in Foo
|
||||
const a = Foo { y: 0u32 };
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
x: u8
|
||||
}
|
||||
@ -5,4 +10,4 @@ circuit Foo {
|
||||
function main() {
|
||||
const y: u8 = 1;
|
||||
const a = Foo { y };
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,15 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
inputs:
|
||||
- inline.in: |
|
||||
[main]
|
||||
x: u8 = 10;
|
||||
|
||||
[registers]
|
||||
r0: bool = false;
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
x: u8
|
||||
|
||||
@ -6,8 +18,9 @@ circuit Foo {
|
||||
}
|
||||
}
|
||||
|
||||
function main() {
|
||||
const x: u8 = 1;
|
||||
function main(x: u8) -> bool {
|
||||
const a = Foo { x };
|
||||
const b = Foo::new(x);
|
||||
}
|
||||
|
||||
return b.x == a.x;
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
function main() {
|
||||
const a = Foo { };
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,12 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
inputs:
|
||||
- member.in: |
|
||||
[registers]
|
||||
r0: bool = false;
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
x: u32,
|
||||
|
||||
@ -6,8 +15,8 @@ circuit Foo {
|
||||
}
|
||||
}
|
||||
|
||||
function main() {
|
||||
function main() -> bool {
|
||||
const a = Foo { x: 1u32 };
|
||||
|
||||
console.assert(a.echo() == 1u32);
|
||||
}
|
||||
return a.echo() == 1u32;
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
function echo(x: u32) -> u32 {
|
||||
return x;
|
||||
@ -7,4 +12,4 @@ circuit Foo {
|
||||
function main() {
|
||||
const a = Foo { };
|
||||
const err = a.echoed(1u32);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
function echo(x: u32) -> u32 {
|
||||
return x;
|
||||
@ -7,4 +12,4 @@ circuit Foo {
|
||||
function main() {
|
||||
const a = Foo { };
|
||||
const err = a.echo(1u32); // echo is a static function and must be accessed using `::`
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,15 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
inputs:
|
||||
- inline.in: |
|
||||
[main]
|
||||
x: u32 = 10;
|
||||
|
||||
[registers]
|
||||
r0: bool = false;
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
x: u32,
|
||||
|
||||
@ -10,9 +22,9 @@ circuit Foo {
|
||||
}
|
||||
}
|
||||
|
||||
function main() {
|
||||
const a = Foo { x: 1u32 };
|
||||
function main(x: u32) -> bool {
|
||||
const a = Foo { x };
|
||||
const b = a.add_x(1u32);
|
||||
|
||||
console.assert(b == 2u32);
|
||||
return b == x + 1;
|
||||
}
|
||||
|
@ -1,11 +1,20 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
inputs:
|
||||
- static.in: |
|
||||
[registers]
|
||||
r0: bool = false;
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
function echo(x: u32) -> u32 {
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
||||
function main() {
|
||||
function main() -> bool {
|
||||
const a = Foo::echo(1u32);
|
||||
|
||||
console.assert(a == 1u32);
|
||||
}
|
||||
return a == 1u32;
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
function echo(x: u32) -> u32 {
|
||||
return x;
|
||||
@ -6,4 +11,4 @@ circuit Foo {
|
||||
|
||||
function main() {
|
||||
const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
function qux() {}
|
||||
|
||||
@ -12,4 +17,4 @@ circuit Foo {
|
||||
|
||||
function main() {
|
||||
Foo::baz();
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
function echo(x: u32) -> u32 {
|
||||
return x;
|
||||
@ -6,4 +11,4 @@ circuit Foo {
|
||||
|
||||
function main() {
|
||||
const err = Foo::echoed(1u32);
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,18 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
inputs:
|
||||
- member.in: |
|
||||
[registers]
|
||||
r0: bool = false;
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
x: u32,
|
||||
}
|
||||
|
||||
function main() {
|
||||
function main() -> bool {
|
||||
const a = Foo { x: 1u32 };
|
||||
|
||||
console.assert(a.x == 1u32);
|
||||
}
|
||||
return a.x == 1u32;
|
||||
}
|
||||
|
@ -1,3 +1,12 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
inputs:
|
||||
- member.in: |
|
||||
[registers]
|
||||
r0: bool = false;
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
foo: u32,
|
||||
|
||||
@ -6,10 +15,9 @@ circuit Foo {
|
||||
}
|
||||
}
|
||||
|
||||
function main() {
|
||||
function main() -> bool {
|
||||
const a = Foo { foo: 1 };
|
||||
|
||||
const b = a.foo + Foo::bar();
|
||||
|
||||
console.assert(b == 2u32);
|
||||
return b == 2u32;
|
||||
}
|
||||
|
@ -1,9 +1,13 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
x: u32
|
||||
}
|
||||
|
||||
function main() {
|
||||
const a = Foo { x: 1u32 };
|
||||
|
||||
const err = a.y;
|
||||
}
|
||||
}
|
||||
|
@ -1,318 +0,0 @@
|
||||
// Copyright (C) 2019-2021 Aleo Systems Inc.
|
||||
// This file is part of the Leo library.
|
||||
|
||||
// The Leo library is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// The Leo library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::{assert_satisfied, expect_asg_error, parse_program};
|
||||
|
||||
// Expressions
|
||||
|
||||
#[test]
|
||||
fn test_inline() {
|
||||
let program_string = include_str!("inline.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_inline_fail() {
|
||||
let program_string = include_str!("inline_fail.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_inline_undefined() {
|
||||
let program_string = include_str!("inline_undefined.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
// Members
|
||||
|
||||
#[test]
|
||||
fn test_member_variable() {
|
||||
let program_string = include_str!("member_variable.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_member_variable_fail() {
|
||||
let program_string = include_str!("member_variable_fail.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_member_variable_and_function() {
|
||||
let program_string = include_str!("member_variable_and_function.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_member_function() {
|
||||
let program_string = include_str!("member_function.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_member_function_fail() {
|
||||
let program_string = include_str!("member_function_fail.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_member_function_invalid() {
|
||||
let program_string = include_str!("member_function_invalid.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_member_function_nested() {
|
||||
let program_string = include_str!("member_function_nested.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_member_static_function() {
|
||||
let program_string = include_str!("member_static_function.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_member_static_function_nested() {
|
||||
let program_string = include_str!("member_static_function_nested.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_member_static_function_invalid() {
|
||||
let program_string = include_str!("member_static_function_invalid.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_member_static_function_undefined() {
|
||||
let program_string = include_str!("member_static_function_undefined.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error)
|
||||
}
|
||||
|
||||
// Constant
|
||||
#[test]
|
||||
fn test_const_self_variable() {
|
||||
let program_string = include_str!("const_self_variable.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_const_self_variable_fail() {
|
||||
let program_string = include_str!("const_self_variable_fail.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
// Mutability
|
||||
|
||||
#[test]
|
||||
fn test_mutate_function_fail() {
|
||||
let program_string = include_str!("mut_function_fail.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mutate_self_variable() {
|
||||
let program_string = include_str!("mut_self_variable.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mutate_self_variable_branch() {
|
||||
let program_string = include_str!("mut_self_variable_branch.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mutate_self_variable_conditional() {
|
||||
let program_string = include_str!("mut_self_variable_conditional.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mutate_self_variable_fail() {
|
||||
let program_string = include_str!("mut_self_variable_fail.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mutate_self_function_fail() {
|
||||
let program_string = include_str!("mut_self_function_fail.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mutate_self_static_function_fail() {
|
||||
let program_string = include_str!("mut_self_static_function_fail.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mutate_static_function_fail() {
|
||||
let program_string = include_str!("mut_static_function_fail.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mutate_variable() {
|
||||
let program_string = include_str!("mut_variable.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mutate_variable_fail() {
|
||||
let program_string = include_str!("mut_variable_fail.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
// Self
|
||||
|
||||
#[test]
|
||||
fn test_self_fail() {
|
||||
let program_string = include_str!("self_fail.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_self_member_pass() {
|
||||
let program_string = include_str!("self_member.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_self_member_invalid() {
|
||||
let program_string = include_str!("self_member_invalid.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_self_member_undefined() {
|
||||
let program_string = include_str!("self_member_undefined.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
// Inline circuit member
|
||||
|
||||
#[test]
|
||||
fn test_inline_member_pass() {
|
||||
let program_string = include_str!("inline_member_pass.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_inline_member_fail() {
|
||||
let program_string = include_str!("inline_member_fail.leo");
|
||||
let error = parse_program(program_string).err().unwrap();
|
||||
|
||||
expect_asg_error(error);
|
||||
}
|
||||
|
||||
// All
|
||||
|
||||
#[test]
|
||||
fn test_pedersen_mock() {
|
||||
let program_string = include_str!("pedersen_mock.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_define_circuit_inside_circuit_function() {
|
||||
let program_string = include_str!("define_circuit_inside_circuit_function.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_duplicate_name_context() {
|
||||
let program_string = include_str!("duplicate_name_context.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mutable_call_immutable_context() {
|
||||
let program_string = include_str!("mutable_call_immutable_context.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
a: u8,
|
||||
|
||||
@ -8,4 +13,4 @@ function main() {
|
||||
let f = Foo { a: 0u8 };
|
||||
|
||||
f.bar = 1u8;
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
a: u8,
|
||||
|
||||
@ -12,4 +17,4 @@ function main() {
|
||||
let f = Foo { a: 0u8 };
|
||||
|
||||
f.set_a(1u8);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
a: u8,
|
||||
|
||||
@ -12,4 +17,4 @@ function main() {
|
||||
let f = Foo { a: 0u8 };
|
||||
|
||||
f.set_a(1u8);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
a: u8,
|
||||
|
||||
@ -19,4 +24,4 @@ function main() {
|
||||
f.set_a(2u8);
|
||||
|
||||
console.assert(f.a == 2u8);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
a: u8,
|
||||
|
||||
@ -29,4 +34,4 @@ function main() {
|
||||
f.set_a(true, 2u8);
|
||||
|
||||
console.assert(f.a == 2u8);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
function main() {
|
||||
let f = Foo { a: 0u32 };
|
||||
|
||||
@ -12,4 +17,4 @@ circuit Foo {
|
||||
self.a = 5u32; // Mutating a variable inside a conditional statement should work.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
a: u8,
|
||||
|
||||
@ -10,4 +15,4 @@ function main() {
|
||||
let f = Foo { a: 0u8 };
|
||||
|
||||
f.set_a(1u8);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
function bar() {}
|
||||
}
|
||||
@ -6,4 +11,4 @@ function main() {
|
||||
let f = Foo { a: 0u8 };
|
||||
|
||||
f.bar = 1u8;
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
a: u8,
|
||||
}
|
||||
@ -14,4 +19,4 @@ function main() {
|
||||
f.a = 2u8;
|
||||
|
||||
console.assert(f.a == 2u8);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
a: u8,
|
||||
}
|
||||
@ -6,4 +11,4 @@ function main() {
|
||||
const f = Foo { a: 0u8 };
|
||||
|
||||
f.a = 1u8;
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
circuit TestMe {
|
||||
x: u8,
|
||||
|
||||
@ -22,4 +27,4 @@ function main () {
|
||||
console.assert(u == 1u8);
|
||||
const v = TestMe::new().test_me();
|
||||
console.assert(v == 2u8);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,15 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
inputs:
|
||||
- pedersen.in: |
|
||||
[main]
|
||||
hash_input: [bool; 512] = [true; 512];
|
||||
|
||||
[registers]
|
||||
r0: bool = false;
|
||||
*/
|
||||
|
||||
circuit PedersenHash {
|
||||
parameters: [u32; 512]
|
||||
|
||||
@ -16,12 +28,11 @@ circuit PedersenHash {
|
||||
}
|
||||
|
||||
// The 'pedersen_hash' main function.
|
||||
function main() {
|
||||
function main(hash_input: [bool; 512]) -> bool {
|
||||
const parameters = [0u32; 512];
|
||||
const pedersen = PedersenHash::new(parameters);
|
||||
const hash_input: [bool; 512] = [true; 512];
|
||||
|
||||
const res = pedersen.hash(hash_input);
|
||||
|
||||
console.assert(res == 0u32);
|
||||
return res == 0u32;
|
||||
}
|
||||
|
@ -1,4 +1,10 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
// static is deprecated
|
||||
static function new() -> Self {
|
||||
return Self { };
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
function main() {
|
||||
Self::main();
|
||||
}
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
f: u32,
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
f: u32,
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
circuit Foo {
|
||||
function bar() -> u32 {
|
||||
return self.f;
|
||||
|
@ -0,0 +1,18 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 95
|
||||
num_constraints: 95
|
||||
at: 5267486d9db0d5d95b248da00196e1a6e5c6e165f8580eae4fbf20d8e1560fd7
|
||||
bt: e0a9aa0cab882fb690b28137d24f271ccaa334521934a3badc07592a31b7be7f
|
||||
ct: 5983ee7f60c1fc1ad4aaece7815002040cd4b5a7e019b3967f948d30f5d7ec96
|
||||
output:
|
||||
- input_file: func_circ.in
|
||||
output:
|
||||
registers:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
@ -0,0 +1,15 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 0
|
||||
num_constraints: 0
|
||||
at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
output:
|
||||
- input_file: empty
|
||||
output:
|
||||
registers: {}
|
18
tests/expectations/compiler/compiler/circuits/inline.leo.out
Normal file
18
tests/expectations/compiler/compiler/circuits/inline.leo.out
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 32
|
||||
num_constraints: 32
|
||||
at: 4f36fe54f989d60bb9c279120800f4f44596c2efb7ba703669d4c4d591569780
|
||||
bt: d378030968a64801f66d95699329086ca17e676d8bffcf73f6b431cbda7c7005
|
||||
ct: dbd098af6556ed79650d149b1691be336a46f8bad6f327e942508dd11342575e
|
||||
output:
|
||||
- input_file: inline.in
|
||||
output:
|
||||
registers:
|
||||
r0:
|
||||
type: u32
|
||||
value: "100"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'"
|
@ -0,0 +1,18 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 23
|
||||
num_constraints: 23
|
||||
at: 1b2521e1b6fa3c84507b93ff0c68d463de22e8fcf6e750ff11dbf856494e9851
|
||||
bt: e07261c391194324de6c9bb8706ff09c30ce64dfc55ce30bd8aa4b19f7b1443a
|
||||
ct: f053ce5b6adb30f5c4f21f4c4c4001a77517d9c0ca3d113cece2585b22e56635
|
||||
output:
|
||||
- input_file: inline.in
|
||||
output:
|
||||
registers:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:4:15\n |\n 4 | const a = Foo { };\n | ^^^\n |\n = failed to resolve circuit: 'Foo'"
|
@ -0,0 +1,18 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 0
|
||||
num_constraints: 0
|
||||
at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
output:
|
||||
- input_file: member.in
|
||||
output:
|
||||
registers:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^\n |\n = cannot call static function 'echo' of circuit 'Foo' from target"
|
@ -0,0 +1,18 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 161
|
||||
num_constraints: 163
|
||||
at: e35800570ea5a58f3587ffba2b1be2a1df1c5790a6cbe215083e3d5d5a13b2bf
|
||||
bt: 799dc824f6ba6a51959a395a3b5ebf05629aa241dbca9550190f32380b91ae1c
|
||||
ct: 2aa6128cdf932752c8864c26a6a3d4991f3e6a75b22c1261a3389efa67375b01
|
||||
output:
|
||||
- input_file: inline.in
|
||||
output:
|
||||
registers:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
@ -0,0 +1,18 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 0
|
||||
num_constraints: 0
|
||||
at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
output:
|
||||
- input_file: static.in
|
||||
output:
|
||||
registers:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^\n |\n = failed to resolve variable reference 'Foo'"
|
@ -0,0 +1,15 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 0
|
||||
num_constraints: 0
|
||||
at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
output:
|
||||
- input_file: empty
|
||||
output:
|
||||
registers: {}
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'"
|
@ -0,0 +1,18 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 0
|
||||
num_constraints: 0
|
||||
at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
output:
|
||||
- input_file: member.in
|
||||
output:
|
||||
registers:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
@ -0,0 +1,18 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 0
|
||||
num_constraints: 0
|
||||
at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
output:
|
||||
- input_file: member.in
|
||||
output:
|
||||
registers:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:9:17\n |\n 9 | const err = a.y;\n | ^^^\n |\n = illegal reference to non-existant member 'y' of circuit 'Foo'"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'"
|
@ -0,0 +1,15 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 0
|
||||
num_constraints: 0
|
||||
at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
output:
|
||||
- input_file: empty
|
||||
output:
|
||||
registers: {}
|
@ -0,0 +1,15 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 0
|
||||
num_constraints: 0
|
||||
at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
output:
|
||||
- input_file: empty
|
||||
output:
|
||||
registers: {}
|
@ -0,0 +1,15 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 0
|
||||
num_constraints: 0
|
||||
at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
output:
|
||||
- input_file: empty
|
||||
output:
|
||||
registers: {}
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^\n |\n = extra circuit member 'a' for initialization of circuit 'Foo' is not allowed"
|
@ -0,0 +1,15 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 0
|
||||
num_constraints: 0
|
||||
at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
output:
|
||||
- input_file: empty
|
||||
output:
|
||||
registers: {}
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^\n |\n = illegal assignment to immutable variable 'f'"
|
@ -0,0 +1,15 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 0
|
||||
num_constraints: 0
|
||||
at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
output:
|
||||
- input_file: empty
|
||||
output:
|
||||
registers: {}
|
@ -0,0 +1,18 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 33854
|
||||
num_constraints: 50750
|
||||
at: ef530d618c6915bbff2137e7f057b1135dacbdd02e8d4be420320999724633ad
|
||||
bt: 4ec9fd3915bf2762cb32a7f7805918c1b976ca6c59852f505089fd23c0f321b7
|
||||
ct: e13fb652749582faae780837f6de4900f3b6c7202289d2219a543bfdd4f6836e
|
||||
output:
|
||||
- input_file: pedersen.in
|
||||
output:
|
||||
registers:
|
||||
r0:
|
||||
type: bool
|
||||
value: "true"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^\n |\n = expected 'ident', got 'static'"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:4:5\n |\n 4 | Self::main();\n | ^^^^\n |\n = failed to resolve circuit: 'Self'"
|
@ -0,0 +1,15 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- circuit:
|
||||
num_public_variables: 0
|
||||
num_private_variables: 0
|
||||
num_constraints: 0
|
||||
at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
||||
output:
|
||||
- input_file: empty
|
||||
output:
|
||||
registers: {}
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /test/src/main.leo:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target"
|
@ -10,6 +10,6 @@ outputs:
|
||||
bt: 0b017985fe9a0650c67351f1cc247871e9cc9e8c907f2cb47791c5ae1a5b324a
|
||||
ct: 3fb41ccb74d402bc413944e9eb543a7333552052b7781eb257d2b861659d5a09
|
||||
output:
|
||||
- input_file: i16.in
|
||||
- input_file: i8.in
|
||||
output:
|
||||
registers: {}
|
||||
|
@ -10,6 +10,6 @@ outputs:
|
||||
bt: 10b52342f8c44eb9b3335b4df9ca4136de3ad35d5b580b2ab32ae5e10bcdf3b4
|
||||
ct: 2aae7d6631260dcaafbfe9709ade84e75f5172a9baad48e108e7264d5fc17cf6
|
||||
output:
|
||||
- input_file: i16.in
|
||||
- input_file: i8.in
|
||||
output:
|
||||
registers: {}
|
||||
|
@ -10,6 +10,6 @@ outputs:
|
||||
bt: 43214e3563d9bc921ffc9079215a945f8450cf3c02506bd6e23144b2e18944d3
|
||||
ct: a2352ad3a95bc4b0d0ca56ac5b1bcec0cc3b62077d2c3d883f90f8bf014a8e28
|
||||
output:
|
||||
- input_file: i16.in
|
||||
- input_file: i8.in
|
||||
output:
|
||||
registers: {}
|
||||
|
@ -10,6 +10,6 @@ outputs:
|
||||
bt: b8979c4494b630792fad6a0b29a53293c7649f3d5fcd45b8c1d2396f970ca0dd
|
||||
ct: 1acbdb8598982e7bf38d0a531f67d6937a6bd98418c6d382e4201c4a8285df55
|
||||
output:
|
||||
- input_file: i16.in
|
||||
- input_file: i8.in
|
||||
output:
|
||||
registers: {}
|
||||
|
@ -10,6 +10,6 @@ outputs:
|
||||
bt: 35a61219fd7bf101cf1a1a66ad2f71df661d6dc9dda2ed9df12c7650164559aa
|
||||
ct: 50f1a63551e44fb1f2ef29982d5b1580340dcda67d8d8caaa9c837353a950d8f
|
||||
output:
|
||||
- input_file: i16.in
|
||||
- input_file: i8.in
|
||||
output:
|
||||
registers: {}
|
||||
|
@ -10,6 +10,9 @@ outputs:
|
||||
bt: 90a2489533355ee3e27d5cf485612441ec10e21923eb78e6be21633ce11fa8f1
|
||||
ct: 4c2d67fc6e1c4ad44f323c1b958ed94313153573aa72a3c0f0d25b17b54e63bc
|
||||
output:
|
||||
- input_file: i16.in
|
||||
- input_file: i8.in
|
||||
output:
|
||||
registers: {}
|
||||
- input_file: i8_rev.in
|
||||
output:
|
||||
registers: {}
|
||||
|
Loading…
Reference in New Issue
Block a user