mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-27 02:24:15 +03:00
add all core circuit tests
This commit is contained in:
parent
df908345bc
commit
4400545543
@ -280,7 +280,7 @@ impl ParserContext<'_> {
|
|||||||
}))
|
}))
|
||||||
} else {
|
} else {
|
||||||
// Either an invalid unary/binary operator, or more arguments given.
|
// Either an invalid unary/binary operator, or more arguments given.
|
||||||
self.emit_err(ParserError::expr_arbitrary_method_call(span));
|
self.emit_err(ParserError::invalid_method_call(receiver, method, span));
|
||||||
Ok(Expression::Err(ErrExpression { span }))
|
Ok(Expression::Err(ErrExpression { span }))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -575,9 +575,9 @@ impl<'a> ExpressionVisitorDirector<'a> for Director<'a> {
|
|||||||
return self.visit_expression(&input.receiver, destination);
|
return self.visit_expression(&input.receiver, destination);
|
||||||
}
|
}
|
||||||
UnaryOperation::SquareRoot => {
|
UnaryOperation::SquareRoot => {
|
||||||
// Assert field type only.
|
// Assert field or scalar type.
|
||||||
self.visitor
|
self.visitor
|
||||||
.assert_expected_type(destination, Type::Field, input.span());
|
.assert_field_scalar_type(destination, input.span());
|
||||||
return self.visit_expression(&input.receiver, destination);
|
return self.visit_expression(&input.receiver, destination);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,6 +87,8 @@ const FIELD_GROUP_SCALAR_INT_TYPES: [Type; 13] = create_type_superset(FIELD_GROU
|
|||||||
|
|
||||||
const FIELD_GROUP_TYPES: [Type; 2] = [Type::Field, Type::Group];
|
const FIELD_GROUP_TYPES: [Type; 2] = [Type::Field, Type::Group];
|
||||||
|
|
||||||
|
const FIELD_SCALAR_TYPES: [Type; 2] = [Type::Field, Type::Scalar];
|
||||||
|
|
||||||
impl<'a> TypeChecker<'a> {
|
impl<'a> TypeChecker<'a> {
|
||||||
/// Returns a new type checker given a symbol table and error handler.
|
/// Returns a new type checker given a symbol table and error handler.
|
||||||
pub fn new(symbol_table: &'a mut SymbolTable<'a>, handler: &'a Handler) -> Self {
|
pub fn new(symbol_table: &'a mut SymbolTable<'a>, handler: &'a Handler) -> Self {
|
||||||
@ -210,6 +212,11 @@ impl<'a> TypeChecker<'a> {
|
|||||||
self.assert_one_of_types(type_, &FIELD_GROUP_TYPES, span)
|
self.assert_one_of_types(type_, &FIELD_GROUP_TYPES, span)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Emits an error to the handler if the given type is not a field or scalar.
|
||||||
|
pub(crate) fn assert_field_scalar_type(&self, type_: &Option<Type>, span: Span) {
|
||||||
|
self.assert_one_of_types(type_, &FIELD_SCALAR_TYPES, span)
|
||||||
|
}
|
||||||
|
|
||||||
/// Emits an error to the handler if the given type is not a field, group, or integer.
|
/// Emits an error to the handler if the given type is not a field, group, or integer.
|
||||||
pub(crate) fn assert_field_group_int_type(&self, type_: &Option<Type>, span: Span) {
|
pub(crate) fn assert_field_group_int_type(&self, type_: &Option<Type>, span: Span) {
|
||||||
self.assert_one_of_types(type_, &FIELD_GROUP_INT_TYPES, span)
|
self.assert_one_of_types(type_, &FIELD_GROUP_INT_TYPES, span)
|
||||||
|
@ -359,19 +359,19 @@ create_messages!(
|
|||||||
help: None,
|
help: None,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Previously, expression statements were allowed, but not anymore.
|
/// Parsed an expression statement.
|
||||||
@formatted
|
@formatted
|
||||||
expr_stmts_disallowed {
|
expr_stmts_disallowed {
|
||||||
args: (),
|
args: (),
|
||||||
msg: "Expression statements are no longer supported.",
|
msg: "Expression statements are not supported.",
|
||||||
help: None,
|
help: None,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Previously, arbitrary methods were allowed, but not anymore.
|
/// Parsed an unknown method call on the type of an expression.
|
||||||
@formatted
|
@formatted
|
||||||
expr_arbitrary_method_call {
|
invalid_method_call {
|
||||||
args: (),
|
args: (expr: impl Display, func: impl Display),
|
||||||
msg: "Arbitrary methods calls are not supported. Only special ones are.",
|
msg: format!("The type of `{expr}` has no associated function `{func}`"),
|
||||||
help: None,
|
help: None,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,170 @@
|
|||||||
|
/*
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
*/
|
||||||
|
|
||||||
|
function main() -> bool {
|
||||||
|
let owner: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta;
|
||||||
|
let bool_value: bool = true;
|
||||||
|
let field_value: field = 1field;
|
||||||
|
let group_value: group = (0, 1)group;
|
||||||
|
let i8_value: i8 = 1i8;
|
||||||
|
let i16_value: i16 = 1i16;
|
||||||
|
let i32_value: i32 = 1i32;
|
||||||
|
let i64_value: i64 = 1i64;
|
||||||
|
let i128_value: i128 = 1i128;
|
||||||
|
let u8_value: u8 = 1u8;
|
||||||
|
let u16_value: u16 = 1u16;
|
||||||
|
let u32_value: u32 = 1u32;
|
||||||
|
let u64_value: u64 = 1u64;
|
||||||
|
let u128_value: u128 = 1u128;
|
||||||
|
let scalar_value: scalar = 1scalar;
|
||||||
|
let string_value: string = "helloworld";
|
||||||
|
|
||||||
|
// BHP256 commit tests
|
||||||
|
let a1: field = BHP256::commit(owner, 1scalar);
|
||||||
|
let b1: field = BHP256::commit(bool_value, 1scalar);
|
||||||
|
let c1: field = BHP256::commit(field_value, 1scalar);
|
||||||
|
let d1: field = BHP256::commit(group_value, 1scalar);
|
||||||
|
let e1: field = BHP256::commit(i8_value, 1scalar);
|
||||||
|
let f1: field = BHP256::commit(i16_value, 1scalar);
|
||||||
|
let g1: field = BHP256::commit(i32_value, 1scalar);
|
||||||
|
let h1: field = BHP256::commit(i64_value, 1scalar);
|
||||||
|
let i1: field = BHP256::commit(i128_value, 1scalar);
|
||||||
|
let j1: field = BHP256::commit(u8_value, 1scalar);
|
||||||
|
let k1: field = BHP256::commit(u16_value, 1scalar);
|
||||||
|
let l1: field = BHP256::commit(u32_value, 1scalar);
|
||||||
|
let m1: field = BHP256::commit(u64_value, 1scalar);
|
||||||
|
let n1: field = BHP256::commit(u128_value, 1scalar);
|
||||||
|
let o1: field = BHP256::commit(scalar_value, 1scalar);
|
||||||
|
let p1: field = BHP256::commit(string_value, 1scalar);
|
||||||
|
|
||||||
|
// BHP256 hash tests
|
||||||
|
let a11: field = BHP256::hash(owner);
|
||||||
|
let b11: field = BHP256::hash(bool_value);
|
||||||
|
let c11: field = BHP256::hash(field_value);
|
||||||
|
let d11: field = BHP256::hash(group_value);
|
||||||
|
let e11: field = BHP256::hash(i8_value);
|
||||||
|
let f11: field = BHP256::hash(i16_value);
|
||||||
|
let g11: field = BHP256::hash(i32_value);
|
||||||
|
let h11: field = BHP256::hash(i64_value);
|
||||||
|
let i11: field = BHP256::hash(i128_value);
|
||||||
|
let j11: field = BHP256::hash(u8_value);
|
||||||
|
let k11: field = BHP256::hash(u16_value);
|
||||||
|
let l11: field = BHP256::hash(u32_value);
|
||||||
|
let m11: field = BHP256::hash(u64_value);
|
||||||
|
let n11: field = BHP256::hash(u128_value);
|
||||||
|
let o11: field = BHP256::hash(scalar_value);
|
||||||
|
let p11: field = BHP256::hash(string_value);
|
||||||
|
|
||||||
|
// BHP512 commit tests
|
||||||
|
let a2: field = BHP512::commit(owner, 1scalar);
|
||||||
|
let b2: field = BHP512::commit(bool_value, 1scalar);
|
||||||
|
let c2: field = BHP512::commit(field_value, 1scalar);
|
||||||
|
let d2: field = BHP512::commit(group_value, 1scalar);
|
||||||
|
let e2: field = BHP512::commit(i8_value, 1scalar);
|
||||||
|
let f2: field = BHP512::commit(i16_value, 1scalar);
|
||||||
|
let g2: field = BHP512::commit(i32_value, 1scalar);
|
||||||
|
let h2: field = BHP512::commit(i64_value, 1scalar);
|
||||||
|
let i2: field = BHP512::commit(i128_value, 1scalar);
|
||||||
|
let j2: field = BHP512::commit(u8_value, 1scalar);
|
||||||
|
let k2: field = BHP512::commit(u16_value, 1scalar);
|
||||||
|
let l2: field = BHP512::commit(u32_value, 1scalar);
|
||||||
|
let m2: field = BHP512::commit(u64_value, 1scalar);
|
||||||
|
let n2: field = BHP512::commit(u128_value, 1scalar);
|
||||||
|
let o2: field = BHP512::commit(scalar_value, 1scalar);
|
||||||
|
let p2: field = BHP512::commit(string_value, 1scalar);
|
||||||
|
|
||||||
|
// BHP512 hash tests
|
||||||
|
let a22: field = BHP512::hash(owner);
|
||||||
|
let b22: field = BHP512::hash(bool_value);
|
||||||
|
let c22: field = BHP512::hash(field_value);
|
||||||
|
let d22: field = BHP512::hash(group_value);
|
||||||
|
let e22: field = BHP512::hash(i8_value);
|
||||||
|
let f22: field = BHP512::hash(i16_value);
|
||||||
|
let g22: field = BHP512::hash(i32_value);
|
||||||
|
let h22: field = BHP512::hash(i64_value);
|
||||||
|
let i22: field = BHP512::hash(i128_value);
|
||||||
|
let j22: field = BHP512::hash(u8_value);
|
||||||
|
let k22: field = BHP512::hash(u16_value);
|
||||||
|
let l22: field = BHP512::hash(u32_value);
|
||||||
|
let m22: field = BHP512::hash(u64_value);
|
||||||
|
let n22: field = BHP512::hash(u128_value);
|
||||||
|
let o22: field = BHP512::hash(scalar_value);
|
||||||
|
let p22: field = BHP512::hash(string_value);
|
||||||
|
|
||||||
|
// BHP768 commit tests
|
||||||
|
let a3: field = BHP768::commit(owner, 1scalar);
|
||||||
|
let b3: field = BHP768::commit(bool_value, 1scalar);
|
||||||
|
let c3: field = BHP768::commit(field_value, 1scalar);
|
||||||
|
let d3: field = BHP768::commit(group_value, 1scalar);
|
||||||
|
let e3: field = BHP768::commit(i8_value, 1scalar);
|
||||||
|
let f3: field = BHP768::commit(i16_value, 1scalar);
|
||||||
|
let g3: field = BHP768::commit(i32_value, 1scalar);
|
||||||
|
let h3: field = BHP768::commit(i64_value, 1scalar);
|
||||||
|
let i3: field = BHP768::commit(i128_value, 1scalar);
|
||||||
|
let j3: field = BHP768::commit(u8_value, 1scalar);
|
||||||
|
let k3: field = BHP768::commit(u16_value, 1scalar);
|
||||||
|
let l3: field = BHP768::commit(u32_value, 1scalar);
|
||||||
|
let m3: field = BHP768::commit(u64_value, 1scalar);
|
||||||
|
let n3: field = BHP768::commit(u128_value, 1scalar);
|
||||||
|
let o3: field = BHP768::commit(scalar_value, 1scalar);
|
||||||
|
let p3: field = BHP768::commit(string_value, 1scalar);
|
||||||
|
|
||||||
|
// BHP768 hash tests
|
||||||
|
let a33: field = BHP768::hash(owner);
|
||||||
|
let b33: field = BHP768::hash(bool_value);
|
||||||
|
let c33: field = BHP768::hash(field_value);
|
||||||
|
let d33: field = BHP768::hash(group_value);
|
||||||
|
let e33: field = BHP768::hash(i8_value);
|
||||||
|
let f33: field = BHP768::hash(i16_value);
|
||||||
|
let g33: field = BHP768::hash(i32_value);
|
||||||
|
let h33: field = BHP768::hash(i64_value);
|
||||||
|
let i33: field = BHP768::hash(i128_value);
|
||||||
|
let j33: field = BHP768::hash(u8_value);
|
||||||
|
let k33: field = BHP768::hash(u16_value);
|
||||||
|
let l33: field = BHP768::hash(u32_value);
|
||||||
|
let m33: field = BHP768::hash(u64_value);
|
||||||
|
let n33: field = BHP768::hash(u128_value);
|
||||||
|
let o33: field = BHP768::hash(scalar_value);
|
||||||
|
let p33: field = BHP768::hash(string_value);
|
||||||
|
|
||||||
|
// BHP1024 commit tests
|
||||||
|
let a4: field = BHP1024::commit(owner, 1scalar);
|
||||||
|
let b4: field = BHP1024::commit(bool_value, 1scalar);
|
||||||
|
let c4: field = BHP1024::commit(field_value, 1scalar);
|
||||||
|
let d4: field = BHP1024::commit(group_value, 1scalar);
|
||||||
|
let e4: field = BHP1024::commit(i8_value, 1scalar);
|
||||||
|
let f4: field = BHP1024::commit(i16_value, 1scalar);
|
||||||
|
let g4: field = BHP1024::commit(i32_value, 1scalar);
|
||||||
|
let h4: field = BHP1024::commit(i64_value, 1scalar);
|
||||||
|
let i4: field = BHP1024::commit(i128_value, 1scalar);
|
||||||
|
let j4: field = BHP1024::commit(u8_value, 1scalar);
|
||||||
|
let k4: field = BHP1024::commit(u16_value, 1scalar);
|
||||||
|
let l4: field = BHP1024::commit(u32_value, 1scalar);
|
||||||
|
let m4: field = BHP1024::commit(u64_value, 1scalar);
|
||||||
|
let n4: field = BHP1024::commit(u128_value, 1scalar);
|
||||||
|
let o4: field = BHP1024::commit(scalar_value, 1scalar);
|
||||||
|
let p4: field = BHP1024::commit(string_value, 1scalar);
|
||||||
|
|
||||||
|
// BHP1024 hash tests
|
||||||
|
let a44: field = BHP1024::hash(owner);
|
||||||
|
let b44: field = BHP1024::hash(bool_value);
|
||||||
|
let c44: field = BHP1024::hash(field_value);
|
||||||
|
let d44: field = BHP1024::hash(group_value);
|
||||||
|
let e44: field = BHP1024::hash(i8_value);
|
||||||
|
let f44: field = BHP1024::hash(i16_value);
|
||||||
|
let g44: field = BHP1024::hash(i32_value);
|
||||||
|
let h44: field = BHP1024::hash(i64_value);
|
||||||
|
let i44: field = BHP1024::hash(i128_value);
|
||||||
|
let j44: field = BHP1024::hash(u8_value);
|
||||||
|
let k44: field = BHP1024::hash(u16_value);
|
||||||
|
let l44: field = BHP1024::hash(u32_value);
|
||||||
|
let m44: field = BHP1024::hash(u64_value);
|
||||||
|
let n44: field = BHP1024::hash(u128_value);
|
||||||
|
let o44: field = BHP1024::hash(scalar_value);
|
||||||
|
let p44: field = BHP1024::hash(string_value);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
73
tests/compiler/core/algorithms/pedersen.leo
Normal file
73
tests/compiler/core/algorithms/pedersen.leo
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
*/
|
||||||
|
|
||||||
|
function main() -> bool {
|
||||||
|
let bool_value: bool = true;
|
||||||
|
let i8_value: i8 = 1i8;
|
||||||
|
let i16_value: i16 = 1i16;
|
||||||
|
let i32_value: i32 = 1i32;
|
||||||
|
let i64_value: i64 = 1i64;
|
||||||
|
let i128_value: i128 = 1i128;
|
||||||
|
let u8_value: u8 = 1u8;
|
||||||
|
let u16_value: u16 = 1u16;
|
||||||
|
let u32_value: u32 = 1u32;
|
||||||
|
let u64_value: u64 = 1u64;
|
||||||
|
let u128_value: u128 = 1u128;
|
||||||
|
let string_value: string = "helloworld";
|
||||||
|
|
||||||
|
// Pedersen64 commit tests
|
||||||
|
let a1: group = Pedersen64::commit(bool_value, 1scalar);
|
||||||
|
let b1: group = Pedersen64::commit(i8_value, 1scalar);
|
||||||
|
let c1: group = Pedersen64::commit(i16_value, 1scalar);
|
||||||
|
let d1: group = Pedersen64::commit(i32_value, 1scalar);
|
||||||
|
let e1: group = Pedersen64::commit(i64_value, 1scalar);
|
||||||
|
let f1: group = Pedersen64::commit(u8_value, 1scalar);
|
||||||
|
let g1: group = Pedersen64::commit(u16_value, 1scalar);
|
||||||
|
let h1: group = Pedersen64::commit(u32_value, 1scalar);
|
||||||
|
let i1: group = Pedersen64::commit(u64_value, 1scalar);
|
||||||
|
let j1: group = Pedersen64::commit(string_value, 1scalar);
|
||||||
|
|
||||||
|
// Pedersen64 hash tests
|
||||||
|
let a11: group = Pedersen64::hash(bool_value);
|
||||||
|
let b11: group = Pedersen64::hash(i8_value);
|
||||||
|
let c11: group = Pedersen64::hash(i16_value);
|
||||||
|
let d11: group = Pedersen64::hash(i32_value);
|
||||||
|
let e11: group = Pedersen64::hash(i64_value);
|
||||||
|
let f11: group = Pedersen64::hash(u8_value);
|
||||||
|
let g11: group = Pedersen64::hash(u16_value);
|
||||||
|
let h11: group = Pedersen64::hash(u32_value);
|
||||||
|
let i11: group = Pedersen64::hash(u64_value);
|
||||||
|
let j11: group = Pedersen64::hash(string_value);
|
||||||
|
|
||||||
|
// Pedersen128 commit tests
|
||||||
|
let a2: group = Pedersen128::commit(bool_value, 1scalar);
|
||||||
|
let b2: group = Pedersen128::commit(i8_value, 1scalar);
|
||||||
|
let c2: group = Pedersen128::commit(i16_value, 1scalar);
|
||||||
|
let d2: group = Pedersen128::commit(i32_value, 1scalar);
|
||||||
|
let e2: group = Pedersen128::commit(i64_value, 1scalar);
|
||||||
|
let f2: group = Pedersen128::commit(i128_value, 1scalar);
|
||||||
|
let g2: group = Pedersen128::commit(u8_value, 1scalar);
|
||||||
|
let h2: group = Pedersen128::commit(u16_value, 1scalar);
|
||||||
|
let i2: group = Pedersen128::commit(u32_value, 1scalar);
|
||||||
|
let j2: group = Pedersen128::commit(u64_value, 1scalar);
|
||||||
|
let k2: group = Pedersen128::commit(u128_value, 1scalar);
|
||||||
|
let l2: group = Pedersen128::commit(string_value, 1scalar);
|
||||||
|
|
||||||
|
// Pedersen128 hash tests
|
||||||
|
let a22: group = Pedersen128::hash(bool_value);
|
||||||
|
let b22: group = Pedersen128::hash(i8_value);
|
||||||
|
let c22: group = Pedersen128::hash(i16_value);
|
||||||
|
let d22: group = Pedersen128::hash(i32_value);
|
||||||
|
let e22: group = Pedersen128::hash(i64_value);
|
||||||
|
let f22: group = Pedersen128::hash(i128_value);
|
||||||
|
let g22: group = Pedersen128::hash(u8_value);
|
||||||
|
let h22: group = Pedersen128::hash(u16_value);
|
||||||
|
let i22: group = Pedersen128::hash(u32_value);
|
||||||
|
let j22: group = Pedersen128::hash(u64_value);
|
||||||
|
let k22: group = Pedersen128::hash(u128_value);
|
||||||
|
let l22: group = Pedersen128::hash(string_value);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
@ -1,9 +1,70 @@
|
|||||||
/*
|
/*
|
||||||
namespace: Compile
|
namespace: Compile
|
||||||
expectation: Fail
|
expectation: Pass
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// todo: rewrite this test so it properly tests poseidon hash functions.
|
function main() -> bool {
|
||||||
function main(public poseidon: Poseidon, a: bool) -> bool {
|
let owner: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta;
|
||||||
return a;
|
let bool_value: bool = true;
|
||||||
}
|
let field_value: field = 1field;
|
||||||
|
let group_value: group = (0, 1)group;
|
||||||
|
let i8_value: i8 = 1i8;
|
||||||
|
let i16_value: i16 = 1i16;
|
||||||
|
let i32_value: i32 = 1i32;
|
||||||
|
let i64_value: i64 = 1i64;
|
||||||
|
let i128_value: i128 = 1i128;
|
||||||
|
let u8_value: u8 = 1u8;
|
||||||
|
let u16_value: u16 = 1u16;
|
||||||
|
let u32_value: u32 = 1u32;
|
||||||
|
let u64_value: u64 = 1u64;
|
||||||
|
let u128_value: u128 = 1u128;
|
||||||
|
let scalar_value: scalar = 1scalar;
|
||||||
|
let string_value: string = "helloworld";
|
||||||
|
|
||||||
|
// Poseidon2 hash tests
|
||||||
|
let a1: field = Poseidon2::hash(field_value);
|
||||||
|
let b1: field = Poseidon2::hash(i8_value);
|
||||||
|
let c1: field = Poseidon2::hash(i16_value);
|
||||||
|
let d1: field = Poseidon2::hash(i32_value);
|
||||||
|
let e1: field = Poseidon2::hash(i64_value);
|
||||||
|
let f1: field = Poseidon2::hash(i128_value);
|
||||||
|
let g1: field = Poseidon2::hash(u8_value);
|
||||||
|
let h1: field = Poseidon2::hash(u16_value);
|
||||||
|
let i1: field = Poseidon2::hash(u32_value);
|
||||||
|
let j1: field = Poseidon2::hash(u64_value);
|
||||||
|
let k1: field = Poseidon2::hash(u128_value);
|
||||||
|
let l1: field = Poseidon2::hash(scalar_value);
|
||||||
|
let m1: field = Poseidon2::hash(string_value);
|
||||||
|
|
||||||
|
// Poseidon4 hash tests
|
||||||
|
let a2: field = Poseidon4::hash(field_value);
|
||||||
|
let b2: field = Poseidon4::hash(i8_value);
|
||||||
|
let c2: field = Poseidon4::hash(i16_value);
|
||||||
|
let d2: field = Poseidon4::hash(i32_value);
|
||||||
|
let e2: field = Poseidon4::hash(i64_value);
|
||||||
|
let f2: field = Poseidon4::hash(i128_value);
|
||||||
|
let g2: field = Poseidon4::hash(u8_value);
|
||||||
|
let h2: field = Poseidon4::hash(u16_value);
|
||||||
|
let i2: field = Poseidon4::hash(u32_value);
|
||||||
|
let j2: field = Poseidon4::hash(u64_value);
|
||||||
|
let k2: field = Poseidon4::hash(u128_value);
|
||||||
|
let l2: field = Poseidon4::hash(scalar_value);
|
||||||
|
let m2: field = Poseidon4::hash(string_value);
|
||||||
|
|
||||||
|
// Poseidon8 hash tests
|
||||||
|
let a3: field = Poseidon8::hash(field_value);
|
||||||
|
let b3: field = Poseidon8::hash(i8_value);
|
||||||
|
let c3: field = Poseidon8::hash(i16_value);
|
||||||
|
let d3: field = Poseidon8::hash(i32_value);
|
||||||
|
let e3: field = Poseidon8::hash(i64_value);
|
||||||
|
let f3: field = Poseidon8::hash(i128_value);
|
||||||
|
let g3: field = Poseidon8::hash(u8_value);
|
||||||
|
let h3: field = Poseidon8::hash(u16_value);
|
||||||
|
let i3: field = Poseidon8::hash(u32_value);
|
||||||
|
let j3: field = Poseidon8::hash(u64_value);
|
||||||
|
let k3: field = Poseidon8::hash(u128_value);
|
||||||
|
let l3: field = Poseidon8::hash(scalar_value);
|
||||||
|
let m3: field = Poseidon8::hash(string_value);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
@ -10,15 +10,15 @@ function main(a: field, b: field) -> bool {
|
|||||||
let f: field = a.inv();
|
let f: field = a.inv();
|
||||||
let g: field = a.neg();
|
let g: field = a.neg();
|
||||||
let i: field = a.square();
|
let i: field = a.square();
|
||||||
let j: field = a.sqrt();
|
let j: field = a.square_root();
|
||||||
|
|
||||||
// binary
|
// binary
|
||||||
let k: field = a.add(b);
|
let k: field = a.add(b);
|
||||||
let m: field = a.div(b);
|
let m: field = a.div(b);
|
||||||
let o: bool = a.eq(b);
|
let o: bool = a.eq(b);
|
||||||
let p: bool = a.ge(b);
|
let p: bool = a.gte(b);
|
||||||
let q: bool = a.gt(b);
|
let q: bool = a.gt(b);
|
||||||
let r: bool = a.le(b);
|
let r: bool = a.lte(b);
|
||||||
let s: bool = a.lt(b);
|
let s: bool = a.lt(b);
|
||||||
let t: field = a.mul(b);
|
let t: field = a.mul(b);
|
||||||
let w: bool = a.neq(b);
|
let w: bool = a.neq(b);
|
||||||
|
@ -18,9 +18,9 @@ function main(a: i128, b: i128) -> bool {
|
|||||||
let m: i128 = a.div(b);
|
let m: i128 = a.div(b);
|
||||||
let n: i128 = a.div_wrapped(b);
|
let n: i128 = a.div_wrapped(b);
|
||||||
let o: bool = a.eq(b);
|
let o: bool = a.eq(b);
|
||||||
let p: bool = a.ge(b);
|
let p: bool = a.gte(b);
|
||||||
let q: bool = a.gt(b);
|
let q: bool = a.gt(b);
|
||||||
let r: bool = a.le(b);
|
let r: bool = a.lte(b);
|
||||||
let s: bool = a.lt(b);
|
let s: bool = a.lt(b);
|
||||||
let t: i128 = a.mul(b);
|
let t: i128 = a.mul(b);
|
||||||
let u: i128 = a.mul_wrapped(b);
|
let u: i128 = a.mul_wrapped(b);
|
||||||
|
@ -18,9 +18,9 @@ function main(a: i16, b: i16) -> bool {
|
|||||||
let m: i16 = a.div(b);
|
let m: i16 = a.div(b);
|
||||||
let n: i16 = a.div_wrapped(b);
|
let n: i16 = a.div_wrapped(b);
|
||||||
let o: bool = a.eq(b);
|
let o: bool = a.eq(b);
|
||||||
let p: bool = a.ge(b);
|
let p: bool = a.gte(b);
|
||||||
let q: bool = a.gt(b);
|
let q: bool = a.gt(b);
|
||||||
let r: bool = a.le(b);
|
let r: bool = a.lte(b);
|
||||||
let s: bool = a.lt(b);
|
let s: bool = a.lt(b);
|
||||||
let t: i16 = a.mul(b);
|
let t: i16 = a.mul(b);
|
||||||
let u: i16 = a.mul_wrapped(b);
|
let u: i16 = a.mul_wrapped(b);
|
||||||
|
@ -18,9 +18,9 @@ function main(a: i32, b: i32) -> bool {
|
|||||||
let m: i32 = a.div(b);
|
let m: i32 = a.div(b);
|
||||||
let n: i32 = a.div_wrapped(b);
|
let n: i32 = a.div_wrapped(b);
|
||||||
let o: bool = a.eq(b);
|
let o: bool = a.eq(b);
|
||||||
let p: bool = a.ge(b);
|
let p: bool = a.gte(b);
|
||||||
let q: bool = a.gt(b);
|
let q: bool = a.gt(b);
|
||||||
let r: bool = a.le(b);
|
let r: bool = a.lte(b);
|
||||||
let s: bool = a.lt(b);
|
let s: bool = a.lt(b);
|
||||||
let t: i32 = a.mul(b);
|
let t: i32 = a.mul(b);
|
||||||
let u: i32 = a.mul_wrapped(b);
|
let u: i32 = a.mul_wrapped(b);
|
||||||
|
@ -18,9 +18,9 @@ function main(a: i64, b: i64) -> bool {
|
|||||||
let m: i64 = a.div(b);
|
let m: i64 = a.div(b);
|
||||||
let n: i64 = a.div_wrapped(b);
|
let n: i64 = a.div_wrapped(b);
|
||||||
let o: bool = a.eq(b);
|
let o: bool = a.eq(b);
|
||||||
let p: bool = a.ge(b);
|
let p: bool = a.gte(b);
|
||||||
let q: bool = a.gt(b);
|
let q: bool = a.gt(b);
|
||||||
let r: bool = a.le(b);
|
let r: bool = a.lte(b);
|
||||||
let s: bool = a.lt(b);
|
let s: bool = a.lt(b);
|
||||||
let t: i64 = a.mul(b);
|
let t: i64 = a.mul(b);
|
||||||
let u: i64 = a.mul_wrapped(b);
|
let u: i64 = a.mul_wrapped(b);
|
||||||
|
@ -18,9 +18,9 @@ function main(a: i8, b: i8) -> bool {
|
|||||||
let m: i8 = a.div(b);
|
let m: i8 = a.div(b);
|
||||||
let n: i8 = a.div_wrapped(b);
|
let n: i8 = a.div_wrapped(b);
|
||||||
let o: bool = a.eq(b);
|
let o: bool = a.eq(b);
|
||||||
let p: bool = a.ge(b);
|
let p: bool = a.gte(b);
|
||||||
let q: bool = a.gt(b);
|
let q: bool = a.gt(b);
|
||||||
let r: bool = a.le(b);
|
let r: bool = a.lte(b);
|
||||||
let s: bool = a.lt(b);
|
let s: bool = a.lt(b);
|
||||||
let t: i8 = a.mul(b);
|
let t: i8 = a.mul(b);
|
||||||
let u: i8 = a.mul_wrapped(b);
|
let u: i8 = a.mul_wrapped(b);
|
||||||
|
@ -6,8 +6,6 @@ input_file: inputs/add.in
|
|||||||
|
|
||||||
function main(a: u128, b: u128) -> bool {
|
function main(a: u128, b: u128) -> bool {
|
||||||
// unary
|
// unary
|
||||||
let c: u128 = a.abs();
|
|
||||||
let d: u128 = a.abs_wrapped();
|
|
||||||
let h: u128 = a.not();
|
let h: u128 = a.not();
|
||||||
|
|
||||||
// binary
|
// binary
|
||||||
@ -17,9 +15,9 @@ function main(a: u128, b: u128) -> bool {
|
|||||||
let m: u128 = a.div(b);
|
let m: u128 = a.div(b);
|
||||||
let n: u128 = a.div_wrapped(b);
|
let n: u128 = a.div_wrapped(b);
|
||||||
let o: bool = a.eq(b);
|
let o: bool = a.eq(b);
|
||||||
let p: bool = a.ge(b);
|
let p: bool = a.gte(b);
|
||||||
let q: bool = a.gt(b);
|
let q: bool = a.gt(b);
|
||||||
let r: bool = a.le(b);
|
let r: bool = a.lte(b);
|
||||||
let s: bool = a.lt(b);
|
let s: bool = a.lt(b);
|
||||||
let t: u128 = a.mul(b);
|
let t: u128 = a.mul(b);
|
||||||
let u: u128 = a.mul_wrapped(b);
|
let u: u128 = a.mul_wrapped(b);
|
||||||
|
@ -12,8 +12,6 @@ input_file: inputs/add.in
|
|||||||
|
|
||||||
function main(a: u16, b: u16) -> bool {
|
function main(a: u16, b: u16) -> bool {
|
||||||
// unary
|
// unary
|
||||||
let c: u16 = a.abs();
|
|
||||||
let d: u16 = a.abs_wrapped();
|
|
||||||
let h: u16 = a.not();
|
let h: u16 = a.not();
|
||||||
|
|
||||||
// binary
|
// binary
|
||||||
@ -23,9 +21,9 @@ function main(a: u16, b: u16) -> bool {
|
|||||||
let m: u16 = a.div(b);
|
let m: u16 = a.div(b);
|
||||||
let n: u16 = a.div_wrapped(b);
|
let n: u16 = a.div_wrapped(b);
|
||||||
let o: bool = a.eq(b);
|
let o: bool = a.eq(b);
|
||||||
let p: bool = a.ge(b);
|
let p: bool = a.gte(b);
|
||||||
let q: bool = a.gt(b);
|
let q: bool = a.gt(b);
|
||||||
let r: bool = a.le(b);
|
let r: bool = a.lte(b);
|
||||||
let s: bool = a.lt(b);
|
let s: bool = a.lt(b);
|
||||||
let t: u16 = a.mul(b);
|
let t: u16 = a.mul(b);
|
||||||
let u: u16 = a.mul_wrapped(b);
|
let u: u16 = a.mul_wrapped(b);
|
||||||
|
@ -12,8 +12,6 @@ input_file: inputs/add.in
|
|||||||
|
|
||||||
function main(a: u32, b: u32) -> bool {
|
function main(a: u32, b: u32) -> bool {
|
||||||
// unary
|
// unary
|
||||||
let c: u32 = a.abs();
|
|
||||||
let d: u32 = a.abs_wrapped();
|
|
||||||
let h: u32 = a.not();
|
let h: u32 = a.not();
|
||||||
|
|
||||||
// binary
|
// binary
|
||||||
@ -23,9 +21,9 @@ function main(a: u32, b: u32) -> bool {
|
|||||||
let m: u32 = a.div(b);
|
let m: u32 = a.div(b);
|
||||||
let n: u32 = a.div_wrapped(b);
|
let n: u32 = a.div_wrapped(b);
|
||||||
let o: bool = a.eq(b);
|
let o: bool = a.eq(b);
|
||||||
let p: bool = a.ge(b);
|
let p: bool = a.gte(b);
|
||||||
let q: bool = a.gt(b);
|
let q: bool = a.gt(b);
|
||||||
let r: bool = a.le(b);
|
let r: bool = a.lte(b);
|
||||||
let s: bool = a.lt(b);
|
let s: bool = a.lt(b);
|
||||||
let t: u32 = a.mul(b);
|
let t: u32 = a.mul(b);
|
||||||
let u: u32 = a.mul_wrapped(b);
|
let u: u32 = a.mul_wrapped(b);
|
||||||
|
@ -6,8 +6,6 @@ input_file: inputs/add.in
|
|||||||
|
|
||||||
function main(a: u64, b: u64) -> bool {
|
function main(a: u64, b: u64) -> bool {
|
||||||
// unary
|
// unary
|
||||||
let c: u64 = a.abs();
|
|
||||||
let d: u64 = a.abs_wrapped();
|
|
||||||
let h: u64 = a.not();
|
let h: u64 = a.not();
|
||||||
|
|
||||||
// binary
|
// binary
|
||||||
@ -17,9 +15,9 @@ function main(a: u64, b: u64) -> bool {
|
|||||||
let m: u64 = a.div(b);
|
let m: u64 = a.div(b);
|
||||||
let n: u64 = a.div_wrapped(b);
|
let n: u64 = a.div_wrapped(b);
|
||||||
let o: bool = a.eq(b);
|
let o: bool = a.eq(b);
|
||||||
let p: bool = a.ge(b);
|
let p: bool = a.gte(b);
|
||||||
let q: bool = a.gt(b);
|
let q: bool = a.gt(b);
|
||||||
let r: bool = a.le(b);
|
let r: bool = a.lte(b);
|
||||||
let s: bool = a.lt(b);
|
let s: bool = a.lt(b);
|
||||||
let t: u64 = a.mul(b);
|
let t: u64 = a.mul(b);
|
||||||
let u: u64 = a.mul_wrapped(b);
|
let u: u64 = a.mul_wrapped(b);
|
||||||
|
@ -6,8 +6,6 @@ input_file: inputs/add.in
|
|||||||
|
|
||||||
function main(a: u8, b: u8) -> bool {
|
function main(a: u8, b: u8) -> bool {
|
||||||
// unary
|
// unary
|
||||||
let c: u8 = a.abs();
|
|
||||||
let d: u8 = a.abs_wrapped();
|
|
||||||
let h: u8 = a.not();
|
let h: u8 = a.not();
|
||||||
|
|
||||||
// binary
|
// binary
|
||||||
@ -17,9 +15,9 @@ function main(a: u8, b: u8) -> bool {
|
|||||||
let m: u8 = a.div(b);
|
let m: u8 = a.div(b);
|
||||||
let n: u8 = a.div_wrapped(b);
|
let n: u8 = a.div_wrapped(b);
|
||||||
let o: bool = a.eq(b);
|
let o: bool = a.eq(b);
|
||||||
let p: bool = a.ge(b);
|
let p: bool = a.gte(b);
|
||||||
let q: bool = a.gt(b);
|
let q: bool = a.gt(b);
|
||||||
let r: bool = a.le(b);
|
let r: bool = a.lte(b);
|
||||||
let s: bool = a.lt(b);
|
let s: bool = a.lt(b);
|
||||||
let t: u8 = a.mul(b);
|
let t: u8 = a.mul(b);
|
||||||
let u: u8 = a.mul_wrapped(b);
|
let u: u8 = a.mul_wrapped(b);
|
||||||
|
@ -7,14 +7,14 @@ input_file:
|
|||||||
|
|
||||||
function main(a: scalar, b: scalar) -> bool {
|
function main(a: scalar, b: scalar) -> bool {
|
||||||
// unary
|
// unary
|
||||||
let i: scalar = a.sqrt();
|
let i: scalar = a.square_root();
|
||||||
|
|
||||||
// binary
|
// binary
|
||||||
let j: scalar = a.add(b);
|
let j: scalar = a.add(b);
|
||||||
let o: bool = a.eq(b);
|
let o: bool = a.eq(b);
|
||||||
let p: bool = a.ge(b);
|
let p: bool = a.gte(b);
|
||||||
let q: bool = a.gt(b);
|
let q: bool = a.gt(b);
|
||||||
let r: bool = a.le(b);
|
let r: bool = a.lte(b);
|
||||||
let s: bool = a.lt(b);
|
let s: bool = a.lt(b);
|
||||||
let t: group = 2group.mul(b);
|
let t: group = 2group.mul(b);
|
||||||
let u: group = a.mul(2group);
|
let u: group = a.mul(2group);
|
||||||
|
8
tests/expectations/compiler/compiler/address/binary.out
Normal file
8
tests/expectations/compiler/compiler/address/binary.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: ed65ff9337fc5a00cd28d780a985bcb05de7d0e5fe02b555774984552f0c14e8
|
||||||
|
initial_ast: c920b653c76c858673ef791ad9f7b42bd8b70e9ddc2c9bd80c48c531f654334f
|
||||||
|
symbol_table: b736692dc7bdc91c5a808a20a3965f4c8ed2c46c212696d33fc6dd4cfc9a5844
|
8
tests/expectations/compiler/compiler/address/branch.out
Normal file
8
tests/expectations/compiler/compiler/address/branch.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: c7315faf1ac3ceeb90260e64e4a411a27a8aa732892a64c15f49e81adf464beb
|
||||||
|
initial_ast: a2e6b33ed645f7e94b0f4ba40a107543075f53ed5f896072e03d53fbc0ed6462
|
||||||
|
symbol_table: a712053d471b6165809fc2b4f717282ea5590a2cfaeae8a630c8a3250478d179
|
9
tests/expectations/compiler/compiler/address/equal.out
Normal file
9
tests/expectations/compiler/compiler/address/equal.out
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: dc6b4b00185dd6c1f2b83a1bfae619c1d6e3f68ac0f1d3d87ae3bd0ed5caf083
|
||||||
|
- initial_input_ast: 73a38568160c3d2be402043d04ccdc2290abe27647bc81c4bd50367834c206cf
|
||||||
|
initial_ast: afd8bb3f641e3b6020e6ecc30b4db3848409190b5a12e3ddff3f289051ccdce2
|
||||||
|
symbol_table: 18395a136ea969d319cc4c12c59bb7a590a1b11339375240700d7c87f26b1d5d
|
9
tests/expectations/compiler/compiler/address/ternary.out
Normal file
9
tests/expectations/compiler/compiler/address/ternary.out
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: b6371958e735320861c84ed514f258ae8a9858b34615364b2f9ebbaa2aaadd8c
|
||||||
|
- initial_input_ast: d384cfea1a36220e9ea4e246ece89d8fffa320f90aeeb85660bc445ab62a0829
|
||||||
|
initial_ast: d8a742c349763f7a2a55520aa196514e1536491cfb84adcfb0965b05a0c8af49
|
||||||
|
symbol_table: 82f5e85488d21fdf066d318b2c31504f4fd77b98747286b4a030c2e2a568e5d6
|
11
tests/expectations/compiler/compiler/boolean/and.out
Normal file
11
tests/expectations/compiler/compiler/boolean/and.out
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: e6457724e4c3bb27eca30df861f711f962ac47fb0e7d0b9dc959be0feaeb7763
|
||||||
|
- initial_input_ast: c8d27a86795a6d56815a681066b7f462f5476be6d56ec910b74d90c60d8b3cc9
|
||||||
|
- initial_input_ast: 4ff2fb01e2d10a59bf4fcd1ed3b510c6860167dbd3bd4d099c6b8a78d2a767af
|
||||||
|
- initial_input_ast: 96ddbb84cba723df65571d6537a303189e6274389593980996fd7ee50eab996e
|
||||||
|
initial_ast: 8e4ab3450ec4ffbdba78fc0e1450c319bf538fd716af967419c8ce116ccd3d0e
|
||||||
|
symbol_table: 85ba598c10628c776b426b4ff60a5c7ea7d1d58211763c0b088f87965529c12f
|
11
tests/expectations/compiler/compiler/boolean/conditional.out
Normal file
11
tests/expectations/compiler/compiler/boolean/conditional.out
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: e7e9fd77647ac56ed68e547bfb8d0c767313030072a510ec138027ffb62fc368
|
||||||
|
- initial_input_ast: e43c024d6fad8a7a04672fa318936703a4798699283f7b66d9383d52acc104a0
|
||||||
|
- initial_input_ast: 695d879ad212b23fb3e91fae782c701c5f0469bbcaabdcfc6e5dcadc5b7e6c9a
|
||||||
|
- initial_input_ast: 390e951d2b90cf150acd9bc6eeeffbc3a8d7af3ce3781f14ebdce3f1054de4c8
|
||||||
|
initial_ast: 1bc51ad96d1960a2f90f003cbf8588d0bbd2fb18f4c7be6a9452a7c26e0fdead
|
||||||
|
symbol_table: 4fd4e476609947028fbffe357ffb9d962e96c30a9abe3677d75675ae37b12587
|
11
tests/expectations/compiler/compiler/boolean/equal.out
Normal file
11
tests/expectations/compiler/compiler/boolean/equal.out
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: e6457724e4c3bb27eca30df861f711f962ac47fb0e7d0b9dc959be0feaeb7763
|
||||||
|
- initial_input_ast: c8d27a86795a6d56815a681066b7f462f5476be6d56ec910b74d90c60d8b3cc9
|
||||||
|
- initial_input_ast: 4ff2fb01e2d10a59bf4fcd1ed3b510c6860167dbd3bd4d099c6b8a78d2a767af
|
||||||
|
- initial_input_ast: 96ddbb84cba723df65571d6537a303189e6274389593980996fd7ee50eab996e
|
||||||
|
initial_ast: d135ca0877ca63f6c31be572178a69508de9cfb81e258c4aec425861241f84c3
|
||||||
|
symbol_table: ffcddad7271fd96b863ba3f1446dd9c0021f3fb4ead31942fac8de11d5af1817
|
11
tests/expectations/compiler/compiler/boolean/not_equal.out
Normal file
11
tests/expectations/compiler/compiler/boolean/not_equal.out
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: e6457724e4c3bb27eca30df861f711f962ac47fb0e7d0b9dc959be0feaeb7763
|
||||||
|
- initial_input_ast: c8d27a86795a6d56815a681066b7f462f5476be6d56ec910b74d90c60d8b3cc9
|
||||||
|
- initial_input_ast: 4ff2fb01e2d10a59bf4fcd1ed3b510c6860167dbd3bd4d099c6b8a78d2a767af
|
||||||
|
- initial_input_ast: 96ddbb84cba723df65571d6537a303189e6274389593980996fd7ee50eab996e
|
||||||
|
initial_ast: 42cf44d6821d7bd9d2c0222d2a673df9ff9c199f583e79a8b15b8eec53e2aea0
|
||||||
|
symbol_table: 99728cc6a571e63083031cb630c010cd10c32360086df0494297645d08cf82c2
|
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: b60204e9191bfb24680632af160fc62316e8b8043c0e3908c157855cc5547eb3
|
||||||
|
- initial_input_ast: 023263dbb2c455cbc5507aa39f8de80d8d1dbdce22e979302f29046261206ee4
|
||||||
|
- initial_input_ast: a4ec20e71f9401cb0f085770a98cbafb7ca39b4606215cd044ab413790653294
|
||||||
|
- initial_input_ast: a90726f08c89ae8eeb4becffd30d13acaa925902d2a29b59842dfc9ee8dc2e3a
|
||||||
|
initial_ast: b8707d1d3f6c111db2515d4093d15b4739765bfb9e114ed345ebedce0c04024d
|
||||||
|
symbol_table: e6f7abfd330837d1c643b6b7465c02333b1c895e3e6f624085e8e956ab6e5fe5
|
11
tests/expectations/compiler/compiler/boolean/or.out
Normal file
11
tests/expectations/compiler/compiler/boolean/or.out
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: e6457724e4c3bb27eca30df861f711f962ac47fb0e7d0b9dc959be0feaeb7763
|
||||||
|
- initial_input_ast: c8d27a86795a6d56815a681066b7f462f5476be6d56ec910b74d90c60d8b3cc9
|
||||||
|
- initial_input_ast: 4ff2fb01e2d10a59bf4fcd1ed3b510c6860167dbd3bd4d099c6b8a78d2a767af
|
||||||
|
- initial_input_ast: 96ddbb84cba723df65571d6537a303189e6274389593980996fd7ee50eab996e
|
||||||
|
initial_ast: 6738dda9dfa2cce86f92f9d28e0e0750870156f6b5d6146d063baa221f88df3f
|
||||||
|
symbol_table: 6dad9c49c0429f77053df4b683bcc9c8f863000e03f2c1b5936c6c98c24c6476
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EPAR0370026]: Could not lex the following content: `''`.\n"
|
5
tests/expectations/compiler/compiler/char/neq.out
Normal file
5
tests/expectations/compiler/compiler/char/neq.out
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EPAR0370026]: Could not lex the following content: `'a'`.\n"
|
5
tests/expectations/compiler/compiler/char/out.out
Normal file
5
tests/expectations/compiler/compiler/char/out.out
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EPAR0370026]: Could not lex the following content: `'z'`.\n"
|
8
tests/expectations/compiler/compiler/char/string.out
Normal file
8
tests/expectations/compiler/compiler/char/string.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: a7361387d9919bb2857c23ee47cc37c63f0c7cbbb7e7c92b700e2c33403fb4eb
|
||||||
|
initial_ast: 911cec412ed52ce0bc44a7ebb5e1d0e6f7a954c6718e75f06e6715e298b3c8bb
|
||||||
|
symbol_table: 4a29c4b5af2ad1879798454b95b7dd04ae7ecd48289c5f3e7a1e19eaf3921c3b
|
8
tests/expectations/compiler/compiler/console/assert.out
Normal file
8
tests/expectations/compiler/compiler/console/assert.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 9698e866b0330be095c65ca93f17ed5fe3d31c61d5622eaf54c774d79d3b6950
|
||||||
|
initial_ast: 392ae835e23813bebc9247f2dea3c54d171840b66cbb3fb6f323be1cc39cf5dc
|
||||||
|
symbol_table: 91cf14380bad96c722953f9731f62aa8717e83951902dd6106bad45d34883e9e
|
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: e9253dc5764d8870dc6842860993ce0b2495925b3bdb18891b7c4aa67fe0a81d
|
||||||
|
- initial_input_ast: 3153e33ab1630d74ad221b5ce6d5e50c17fb86d91a2aae4ce67b46fec12c1ef4
|
||||||
|
initial_ast: 7c4a3ed293ab61f90336b928a4acb55f1110a6b8b8e756e2c3f91b227d29b670
|
||||||
|
symbol_table: eb7d67bd533250d35ac68d5247bb6dc11b1aa3c78144e6642fad61e0cf36780b
|
8
tests/expectations/compiler/compiler/console/error.out
Normal file
8
tests/expectations/compiler/compiler/console/error.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 6b9e5227fdce9f916cd2398ea85c2d7e7b2f7d706bfa730b8cd1acdeb3f168cd
|
||||||
|
initial_ast: bc7585d64765e570d5b1679250f105b2d57b2d94166ed88b06a22bfeaef0fdbf
|
||||||
|
symbol_table: defa532673c067b1029a2cb28e1ceb49c7f6f99afbc670d886d2db938168d424
|
8
tests/expectations/compiler/compiler/console/log.out
Normal file
8
tests/expectations/compiler/compiler/console/log.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 89959164cbf734ac0d261c7459b9c1214eb2f4b3ab9ec57a0b22db487d6537e4
|
||||||
|
initial_ast: 25f4b353ead7c3435761c93e92900ef85f978e1a4ed2298f239ea396594361d6
|
||||||
|
symbol_table: 1114eb323c8af79b301823753b911c49af1498481ad93b054c6330f00539dcdc
|
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 4132cf36ac66f6b23e249f81b5c2aafa58e4e5e945920cc29752edc5d6d8057f
|
||||||
|
- initial_input_ast: 586ed72429932a1aafcd0f8eed983a4babff8eada9c028b88bbeef24dab1cbc0
|
||||||
|
initial_ast: f8315b82b0a05e0e69fb8b0342b46cbee976ec20d62e0edd2f066bf51acd81d6
|
||||||
|
symbol_table: 6df0605a8770c3002b2f6dfff805332c774cd382d68860fa029a51c01dfca6e1
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^"
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 5411bd17943bb0aa7b0bb27e8b38f57fd27f06f2080b13a32eee50c53de66f6c
|
||||||
|
initial_ast: 32e39793865272af182a2cd74c9c337587bcc7e736748b1ab2de58b3c7e1973e
|
||||||
|
symbol_table: 21187c3fcd8b5c1377772413f1aedc33d9b4fa34a6d43425b5b9a403ac44cf1b
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 18e8a4118829470d3150268bbf8d298954e1f566ea2d42ed9f3660dc25c23fcc
|
||||||
|
initial_ast: 5fc267c1e4a6c7f631816a0b4002a775cb16fb99bd1d3f5f77057050570ce061
|
||||||
|
symbol_table: 4f4561e0804f02ca6cd58fd37cca46531d6a86fb4f6a3dea46c67c3a13e045dd
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: caa45de3b412d749048b9be732a4593f3094c671701093103f580817a741acbb
|
||||||
|
initial_ast: a2db21567eb5e4d8c867af3946fc83c97a8d5573afcdf291f0141afb1ba8292c
|
||||||
|
symbol_table: 57cd0f756819d90c70fc09987ac1bbf2ddf31c7a72cbfd98b8b56a6fc7705581
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^"
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'formatted static_string', got 'hello'\n --> compiler-test:5:17\n |\n 5 | console.log(hello);\n | ^^^^^"
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [ETYC0372013]: The type ComputeKey is a reserved core type name.\n --> compiler-test:4:35\n |\n 4 | function main(public compute_key: ComputeKey, a: bool) -> bool {\n | ^^^^^^^^^^\n"
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [ETYC0372013]: The type PrivateKey is a reserved core type name.\n --> compiler-test:4:35\n |\n 4 | function main(public private_key: PrivateKey, a: bool) -> bool {\n | ^^^^^^^^^^\n"
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [ETYC0372013]: The type Record is a reserved core type name.\n --> compiler-test:4:30\n |\n 4 | function main(public record: Record, a: bool) -> bool {\n | ^^^^^^\n"
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [ETYC0372013]: The type Signature is a reserved core type name.\n --> compiler-test:4:33\n |\n 4 | function main(public signature: Signature, a: bool) -> bool {\n | ^^^^^^^^^\n"
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [ETYC0372013]: The type ViewKey is a reserved core type name.\n --> compiler-test:4:32\n |\n 4 | function main(public view_key: ViewKey, a: bool) -> bool {\n | ^^^^^^^\n"
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: no input
|
||||||
|
initial_ast: 4977eefec7cfb3fd6ddf418c303b8d119a9bbe26265ff6e5e81ad07d6df04ab3
|
||||||
|
symbol_table: 00e1ab10d05676c51e65671158712d7041de760ca226f74a2314f1cef9740402
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: no input
|
||||||
|
initial_ast: f8964b92b0e8d29b284d471e467b9fdc7af981643bc56ff11bf8f5687b410fee
|
||||||
|
symbol_table: 4a439652db94447b85f87bdd262953b6b6233e2d5f22c562215fd792f59f04d3
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: no input
|
||||||
|
initial_ast: 6148244dc50cddd04bc2f1ac1e339355e7ab8927f198d21cfdab98a085a3aa3b
|
||||||
|
symbol_table: 43835e3ddb0a6a15f6ace2186576a1a51de6ad7251d29ff13302546bf1b46a42
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 4a7171bfd4cb5b69729e26e4c6b0915f261d3f51b2937d8de5009069f56abfc1
|
||||||
|
initial_ast: 1b835098e62d2dd40c820b49114bb71f86c84e8b5a842ead7aa651103ceb651e
|
||||||
|
symbol_table: 18c4e80dbb6add0a75bd0f6968cd3216e3023f383a17679f892b32e24cf2cd77
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [ETYC0372004]: Unknown variable `b`\n --> compiler-test:4:14\n |\n 4 | \tlet b: u8 = b;\n | ^\n"
|
8
tests/expectations/compiler/compiler/field/add.out
Normal file
8
tests/expectations/compiler/compiler/field/add.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 770cad45d17364fd3acd19fb67c66ea8f58ea54c5c42386d1a0fe02f241e9f2b
|
||||||
|
initial_ast: 0aebc18388f6ceed8c1d813152ec6392bf687a814d3ae6d63ae10b50420c1a43
|
||||||
|
symbol_table: ab937c57964d900b6931dc3cea2c6cc6bd68fefe9accae8ef8fd879e788d0cb7
|
8
tests/expectations/compiler/compiler/field/div.out
Normal file
8
tests/expectations/compiler/compiler/field/div.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 3b1682d80f44da8eb1ea0d1236b5b9be15f7d4792fe7f31139a4362b2952d6a0
|
||||||
|
initial_ast: 924a3905b44bfea2a10118e4c0336a596b6981a7b06ea39f71daac7000e5cf9c
|
||||||
|
symbol_table: e0b1cda1db6ea8c9f71a6cd9f76a041387e633b0eb652a3382e56ac48aec5adc
|
8
tests/expectations/compiler/compiler/field/eq.out
Normal file
8
tests/expectations/compiler/compiler/field/eq.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 1d6d705c0d5363431af8b58173f1061d4315c4ffe9ae175d6dd1c7ea2a01488f
|
||||||
|
initial_ast: 3546a10b24a6a53ee07d298e7dbbed5122bd9d0c973613296a94189d9e57f246
|
||||||
|
symbol_table: 2685013e472435f156a9de89e73adfedb6e0b214a0fc09b235c453885e644746
|
8
tests/expectations/compiler/compiler/field/field.out
Normal file
8
tests/expectations/compiler/compiler/field/field.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: ccecfe74d5a1f89e892c982f5bf5bb59e094ade3b745b615ab1dcdc31b43dcd7
|
||||||
|
initial_ast: 6a00c3fe77606f34d449fa1c4f8975612edab5c066de791629cbf8c8cb61f289
|
||||||
|
symbol_table: 61dabf815d0a52853b5933812e28a24dc2cc71a0196ab334e9f36621f6528669
|
8
tests/expectations/compiler/compiler/field/mul.out
Normal file
8
tests/expectations/compiler/compiler/field/mul.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 770cad45d17364fd3acd19fb67c66ea8f58ea54c5c42386d1a0fe02f241e9f2b
|
||||||
|
initial_ast: c05e588dae9e5f6e7e1c2d16d08629af8d287b453796b21de89b25d40970ec1b
|
||||||
|
symbol_table: 51cac1a817eead5ffdce703f843e85cdd2ab3ac6ddcb1868fc299ce470aacfb8
|
8
tests/expectations/compiler/compiler/field/negate.out
Normal file
8
tests/expectations/compiler/compiler/field/negate.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: a2440344211fa1dec9858bba8ae80c44b17dcf10d6d75bf639bd9019de97a843
|
||||||
|
initial_ast: c2122be4da96294b4ce4bca5d239176c6bb98765248c767dd41352b6b95888c8
|
||||||
|
symbol_table: 2daa5df91bfa772cfaec061d0b52b9663df25e1c2018fefd9a72b878e9f347a0
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^"
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 43779f378cd19259ccb2a1efc7834a6278bb513e74ee405ba435f7f0690cf902
|
||||||
|
initial_ast: 49b4956c647eb7f6e1ae496ce2e5c4ff238493d9cbc9d20d6f0f3fee09dee4f4
|
||||||
|
symbol_table: 0adb5745c4fc836bedd364a83bea10dab7885dc32a4145fd04a57b51bd2b23d1
|
8
tests/expectations/compiler/compiler/field/pow.out
Normal file
8
tests/expectations/compiler/compiler/field/pow.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: ff3a3f5067b97fc7ac387dbfbb940a8c04f5755783dbf848f661d1962a594bb3
|
||||||
|
initial_ast: 23a0dad3f44569081d0c2c788294753013f617772622e5b4e96cd62850a03a3b
|
||||||
|
symbol_table: 137dd2867c357412b9e5d9dfb51e9e82998217d06f1e07d95999c5c7f312affc
|
8
tests/expectations/compiler/compiler/field/sub.out
Normal file
8
tests/expectations/compiler/compiler/field/sub.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 3b1682d80f44da8eb1ea0d1236b5b9be15f7d4792fe7f31139a4362b2952d6a0
|
||||||
|
initial_ast: 44033abf4e0e2d174cc770b32f903b8a1d4505ee4cbfdcfca3ad1f885071123e
|
||||||
|
symbol_table: a462d7481d4ae6611c332491239401d32ed2dd110042de237495731107048b4e
|
8
tests/expectations/compiler/compiler/field/ternary.out
Normal file
8
tests/expectations/compiler/compiler/field/ternary.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: c3b606138d1dc5f4dc541ddc113fb7d6e07cad4cbd1f382fcc0f9b8517077448
|
||||||
|
initial_ast: b3c731d5b84eec276e7f142f589405dfa2d8e38157d789c204acaed291edc6ff
|
||||||
|
symbol_table: 8efd055a1ca3e84e7af524acdb2d517b1d31c773fb5d0d9045eaaab2112fe184
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 138147dfed32a1089f1d6a4ce19ef4f5278dcdbc2012c432ab460bc0601aaa11
|
||||||
|
initial_ast: 1c957ff165af19ab244d1bc9855c9cd245a45602248516d916e323dbfc861f47
|
||||||
|
symbol_table: df0627c52620cf6e30c96450283a76175c4d1a49dc7ffed195a02e3cdde5ed89
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EAST0372014]: function `main` shadowed by\n --> compiler-test:8:1\n |\n 8 | function main(y: bool) -> bool {\n 9 | console.log(\"{}\", 2u8);\n 10 | return y; \n 11 | }\n | ^\n"
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EAST0372016]: variable `a` shadowed by\n --> compiler-test:3:23\n |\n 3 | function main(a: u32, a: u32) -> u32 {\n | ^\n"
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 78b65cde248c05f4abfe2d3cf794fbd44de082303631db7e3002aa724099fee1
|
||||||
|
initial_ast: 32baf53a93f4c65aa96be164fb1d7ea3b611340e6d5e7b1ee4f0c852efe5c8a1
|
||||||
|
symbol_table: 738974bc93d03e230299143f22c4a8cb38e0962af93e19728f74a6bb8d25a6d0
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 14d0aff05a3b8673ac44d18a969bd03157e19a724ebe2b6e805fdc82aa1e070d
|
||||||
|
initial_ast: ddc98689a76296f035d6ae14e467c3a68050bb6bfacbcf55a349fe4441011083
|
||||||
|
symbol_table: 69b32d3a21ca899d23b9eba6603ce9eea7191eb9a7a893e28ef3fcc6b355a4ff
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [ETYC0372014]: The function main has no return statement.\n --> compiler-test:3:1\n |\n 3 | function main() -> u8 {}\n | ^^^^^^^^^^^^^^^^^^^^^^^^\n"
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 5b2906e1b93966fe1b141bb06b4aa45f7a6e60ae0c0895b96cf870eb246e98b4
|
||||||
|
initial_ast: 0c1ab684ff51a2b52916570b816761060c361d202f81698ae8608bb785a453b4
|
||||||
|
symbol_table: 6b9e0d6f8517252051117e01937bb64597c6ee78726e8e03579161084f37303f
|
8
tests/expectations/compiler/compiler/function/return.out
Normal file
8
tests/expectations/compiler/compiler/function/return.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 1ee96076151487dc5e1988331d53506585dd380909cbeab8c32d3f6e6913456d
|
||||||
|
initial_ast: ae8cfc6c935d6b293214d82a84be9f135a3894c4eedc0b8c9d96316e00ef0015
|
||||||
|
symbol_table: 9a6f8767701001d0691ff622fada6be3d30c274590d54f847ddb76d7b3da543a
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EPAR0370005]: expected : -- got '='\n --> compiler-test:9:20\n |\n 9 | const myGlobal = 42field;\n | ^"
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EAST0372014]: function `hi` shadowed by\n --> compiler-test:7:17\n |\n 7 | function tester(hi: u8) -> u8 {\n | ^^\n"
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EPAR0370005]: expected : -- got '='\n --> compiler-test:4:14\n |\n 4 | const hi = 2u8;\n | ^"
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EPAR0370041]: Expression statements are not supported.\n --> compiler-test:4:5\n |\n 4 | my_function();\n | ^^^^^^^^^^^^^^"
|
8
tests/expectations/compiler/compiler/group/add.out
Normal file
8
tests/expectations/compiler/compiler/group/add.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: f4e1b23f37abb9bcb386ddfd37ee066395d8e84f8ace0f4eb467264131e89fb0
|
||||||
|
initial_ast: 7109d173cdd239abf5f0f717e669e300cf7bd4b3bde2158a17d1f16c1b154276
|
||||||
|
symbol_table: 915e736b00c979abe896125d986ff41cf16e028842f89cae6440998f85304351
|
8
tests/expectations/compiler/compiler/group/assert_eq.out
Normal file
8
tests/expectations/compiler/compiler/group/assert_eq.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: a183384b085186e92efdf0ccd221ba0f3de6e75cffc5610ed583ccd95aa4adcb
|
||||||
|
initial_ast: b6e75e27703bf6b6af69de95f9c22ef2033db46227f5658a9f2e88c33a169b1d
|
||||||
|
symbol_table: fb66c9abb24c6c1bb79dd5fe9e9b78f293292fb3fab04ede561f866c6dc41f8c
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: no input
|
||||||
|
initial_ast: 947cab0ff6523744676bcf2b5d610c963f5dc1ba18f52e12eb9313914e81ccef
|
||||||
|
symbol_table: 9a61702119ebc681917d7cb7e40ecafa00354849326bf1182635f27a28da35e9
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: no input
|
||||||
|
initial_ast: da7a9bfecd63ce811480fa7eed9bdc4bc6223c957e7e12fdbcd69a84d48da1ad
|
||||||
|
symbol_table: e4a96223c049893c904a90f24d069592b33fc137de0f4816cf92089e63663693
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: no input
|
||||||
|
initial_ast: 740946ba4379c80d6c5b63848b8738b8ec3c44c414ccbba68be7d321c86232b7
|
||||||
|
symbol_table: 1817d91b99941ddc2590c6a2777ad8f7d4ba26a8b2a3baa3932f1a08eb540206
|
8
tests/expectations/compiler/compiler/group/eq.out
Normal file
8
tests/expectations/compiler/compiler/group/eq.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: a183384b085186e92efdf0ccd221ba0f3de6e75cffc5610ed583ccd95aa4adcb
|
||||||
|
initial_ast: b6e75e27703bf6b6af69de95f9c22ef2033db46227f5658a9f2e88c33a169b1d
|
||||||
|
symbol_table: fb66c9abb24c6c1bb79dd5fe9e9b78f293292fb3fab04ede561f866c6dc41f8c
|
8
tests/expectations/compiler/compiler/group/input.out
Normal file
8
tests/expectations/compiler/compiler/group/input.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: eed84b746db9633cd5314c8b23def7c95672f4696824e7504877baa8f62b52ac
|
||||||
|
initial_ast: b6e75e27703bf6b6af69de95f9c22ef2033db46227f5658a9f2e88c33a169b1d
|
||||||
|
symbol_table: fb66c9abb24c6c1bb79dd5fe9e9b78f293292fb3fab04ede561f866c6dc41f8c
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [ETYC0372002]: Found type `group` but type `scalar` was expected\n --> compiler-test:4:26\n |\n 4 | return (_, _)group * a;\n | ^\n"
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 1c07a704862cbf7d7938c51d6d840c9ee713f3b6f661a60cca2a81ef3e55efa2
|
||||||
|
initial_ast: 0d225dc5aee0995ca7c84bdefd9be8fe473ea14876f55c4ac05f95c58b8393e6
|
||||||
|
symbol_table: ae21cfdc16589d2cdf89c4aabece75367892087e76793cd0d7d62c9a04fa511c
|
8
tests/expectations/compiler/compiler/group/negate.out
Normal file
8
tests/expectations/compiler/compiler/group/negate.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: c1a7cb2ec07ebfdcd1f7c0785b389e30ed16055a766d036354e52574a21fa8d9
|
||||||
|
initial_ast: 491aa1b9665527f07687444cb882f1ae5d363ca3b024f9cc3de36027ec37fce4
|
||||||
|
symbol_table: 5f48052c64667bf793d8b6c22db7f867a88c1dfbb9341e53b970d6bb9bf3a11f
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EPAR0370004]: Unexpected white space between terms (0,1) and group\n --> compiler-test:4:25\n |\n 4 | const g: group = (0,1) group;\n | ^"
|
8
tests/expectations/compiler/compiler/group/one.out
Normal file
8
tests/expectations/compiler/compiler/group/one.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: no input
|
||||||
|
initial_ast: ecc46ecae6d85317f8c1657c9653b7e39105b91aca6756df431f6a7bd203c10a
|
||||||
|
symbol_table: 1459210791fd0aae2827b2b7c3fd438e7a8315b290e23cbfe365b4214d5cd284
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 2b6895ba1627e6a4dc444f814e2f6a0134ffdde243017e8dd23009081a15c95b
|
||||||
|
initial_ast: d454c467150c28dce64eb09e55df07e9467d34ce819e768414e8b101d174ae3b
|
||||||
|
symbol_table: 3eec749e9dd6f72ae053f0af3753be405331fdf01739a80df8b1a90c03923d27
|
8
tests/expectations/compiler/compiler/group/point.out
Normal file
8
tests/expectations/compiler/compiler/group/point.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: no input
|
||||||
|
initial_ast: 076729824ebf59b52b6ca66cc20cffcf311d7739738ed307af7936ba923c70ac
|
||||||
|
symbol_table: ac8c4425959cf548f2f0edc8aa637b1d827394f11fe2c10ecef366a803fe30a2
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: 2d76ce81281d5077442c5e6c12b13e536a037f0bb469492ecf0b77191b3ded14
|
||||||
|
initial_ast: 2989b1ba743c2fa15efe1ee5837ea2bf34dd19894799190387facdb1a4c0cdee
|
||||||
|
symbol_table: b914736fbf23a1386a58c96fd9011214dd8a7393446dad3222c8551d8db979e6
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: no input
|
||||||
|
initial_ast: d6c9dc3a6a1f55be58c871ce0c2cd5df0c27756ce6f1502277293894b531e969
|
||||||
|
symbol_table: 7e69e6875d7b047f525e435533e6b299da0779cd28edbf4190f2b701c79d74fb
|
8
tests/expectations/compiler/compiler/group/sub.out
Normal file
8
tests/expectations/compiler/compiler/group/sub.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: f4e1b23f37abb9bcb386ddfd37ee066395d8e84f8ace0f4eb467264131e89fb0
|
||||||
|
initial_ast: 97ab784d4cdbb80329f8284003c821fa956e5b4913277813136217849815200d
|
||||||
|
symbol_table: 4bbffbffd675aec67af4ce2fbf803ec463900233ce1ad4049c7bb8092650859a
|
8
tests/expectations/compiler/compiler/group/ternary.out
Normal file
8
tests/expectations/compiler/compiler/group/ternary.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: a18a82ee746e1fd1f9c6c09c36b055f9d3b44a17dd778c5081f9258d6bb9f3ae
|
||||||
|
initial_ast: bfe7dcd87fa958e67087b7b29d802e77ccb3001d9c487744867e7442628bbb60
|
||||||
|
symbol_table: 52a5d14e586868e2465abde3c15f47d151290737d408944c1474483e3050e399
|
8
tests/expectations/compiler/compiler/group/x_and_y.out
Normal file
8
tests/expectations/compiler/compiler/group/x_and_y.out
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: no input
|
||||||
|
initial_ast: ba4bea7f4452a9a369ed5abb21cf7409f850125dff959f10ba211e50419f8d89
|
||||||
|
symbol_table: f33f5b0c84aac58327880b146c570d74ed3118e93247b4a05680ae2c451db5b1
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: no input
|
||||||
|
initial_ast: 5857efaf620a19b42463f90fc00a309a7c89c31e4a5b664b2bdd1c42161e777b
|
||||||
|
symbol_table: 2d0db26fa84f8daad71afd4420718043de1c97757ae4fe4fa78e9874891d1d80
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: no input
|
||||||
|
initial_ast: 99888f61e01f330edf5125f530a706a2f059ad311f9ffe23c81e0aa1ea017ca9
|
||||||
|
symbol_table: c20979f64468655131a488980c1de31384fd7ff35561ed569c3db6f2d0bc19cc
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: no input
|
||||||
|
initial_ast: 4063f3a3011beeb3e26e60b63f5f7f384aed795cf47525f8f472dea81a82745f
|
||||||
|
symbol_table: f450d14b0bb862b0bec4a5f8d41eb92f7cf951dee469505fb20dbfa25972eb7b
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- output:
|
||||||
|
- initial_input_ast: no input
|
||||||
|
initial_ast: 69ba2a183dfec5347e20a835d55b4d5e164f35f5491a9bbf1ddff9f5db45e8c6
|
||||||
|
symbol_table: 52760622da95d189f6e707df97fc6bba4216fa59022a4ae79d840b9c05fdf5b1
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user