diff --git a/compiler/tests/circuits/inline.leo b/compiler/tests/circuits/inline.leo index ab96e20c5e..1c03113446 100644 --- a/compiler/tests/circuits/inline.leo +++ b/compiler/tests/circuits/inline.leo @@ -1,7 +1,7 @@ -circuit Circ { +circuit Foo { x: u32 } -function main() -> Circ { - return Circ { x: 1u32 } +function main() -> Foo { + return Foo { x: 1u32 } } \ No newline at end of file diff --git a/compiler/tests/circuits/inline_fail.leo b/compiler/tests/circuits/inline_fail.leo index 8e9043cbe4..08492bdad6 100644 --- a/compiler/tests/circuits/inline_fail.leo +++ b/compiler/tests/circuits/inline_fail.leo @@ -1,7 +1,7 @@ -circuit Circ { +circuit Foo { x: u32 } function main() { - let c = Circ { y: 0u32 }; + let c = Foo { y: 0u32 }; } \ No newline at end of file diff --git a/compiler/tests/circuits/inline_undefined.leo b/compiler/tests/circuits/inline_undefined.leo index e1a1099173..dac349c9c4 100644 --- a/compiler/tests/circuits/inline_undefined.leo +++ b/compiler/tests/circuits/inline_undefined.leo @@ -1,3 +1,3 @@ function main() { - let c = Circ { }; + let c = Foo { }; } \ No newline at end of file diff --git a/compiler/tests/circuits/member_field.leo b/compiler/tests/circuits/member_field.leo index b9e7b7d88e..574abfdc7e 100644 --- a/compiler/tests/circuits/member_field.leo +++ b/compiler/tests/circuits/member_field.leo @@ -1,9 +1,9 @@ -circuit Circ { +circuit Foo { x: u32, } function main() -> u32 { - let c = Circ { x: 1u32 }; + let c = Foo { x: 1u32 }; return c.x } \ No newline at end of file diff --git a/compiler/tests/circuits/member_field_fail.leo b/compiler/tests/circuits/member_field_fail.leo index d763606f4b..c866f6c48b 100644 --- a/compiler/tests/circuits/member_field_fail.leo +++ b/compiler/tests/circuits/member_field_fail.leo @@ -1,9 +1,9 @@ -circuit Circ { +circuit Foo { x: u32 } function main() -> u32 { - let c = Circ { x: 1u32 }; + let c = Foo { x: 1u32 }; return c.y } \ No newline at end of file diff --git a/compiler/tests/circuits/member_function.leo b/compiler/tests/circuits/member_function.leo index 169f4491d9..d890a8c321 100644 --- a/compiler/tests/circuits/member_function.leo +++ b/compiler/tests/circuits/member_function.leo @@ -1,10 +1,10 @@ -circuit Circ { +circuit Foo { function echo(x: u32) -> u32 { return x } } function main() -> u32 { - let c = Circ { }; + let c = Foo { }; return c.echo(1u32) } \ No newline at end of file diff --git a/compiler/tests/circuits/member_function_fail.leo b/compiler/tests/circuits/member_function_fail.leo index 282b16a8b6..49a7aca565 100644 --- a/compiler/tests/circuits/member_function_fail.leo +++ b/compiler/tests/circuits/member_function_fail.leo @@ -1,10 +1,10 @@ -circuit Circ { +circuit Foo { function echo(x: u32) -> u32 { return x } } function main() -> u32 { - let c = Circ { }; + let c = Foo { }; return c.echoed(1u32) } \ No newline at end of file diff --git a/compiler/tests/circuits/member_function_invalid.leo b/compiler/tests/circuits/member_function_invalid.leo index b5a85537e7..cb1cbde239 100644 --- a/compiler/tests/circuits/member_function_invalid.leo +++ b/compiler/tests/circuits/member_function_invalid.leo @@ -1,10 +1,10 @@ -circuit Circ { +circuit Foo { static function echo(x: u32) -> u32 { return x } } function main() -> u32 { - let c = Circ { }; + let c = Foo { }; return c.echo(1u32) // echo is a static function and must be accessed using `::` } \ No newline at end of file diff --git a/compiler/tests/circuits/member_static_function.leo b/compiler/tests/circuits/member_static_function.leo index 20e1fa7bdf..ae544fa5a9 100644 --- a/compiler/tests/circuits/member_static_function.leo +++ b/compiler/tests/circuits/member_static_function.leo @@ -1,9 +1,9 @@ -circuit Circ { +circuit Foo { static function echo(x: u32) -> u32 { return x } } function main() -> u32 { - return Circ::echo(1u32) + return Foo::echo(1u32) } \ No newline at end of file diff --git a/compiler/tests/circuits/member_static_function_invalid.leo b/compiler/tests/circuits/member_static_function_invalid.leo index 821341b79e..438e4b80a9 100644 --- a/compiler/tests/circuits/member_static_function_invalid.leo +++ b/compiler/tests/circuits/member_static_function_invalid.leo @@ -1,9 +1,9 @@ -circuit Circ { +circuit Foo { function echo(x: u32) -> u32 { return x } } function main() -> u32 { - return Circ::echo(1u32) // echo is a non-static function and must be accessed using `.` + return Foo::echo(1u32) // echo is a non-static function and must be accessed using `.` } \ No newline at end of file diff --git a/compiler/tests/circuits/member_static_function_undefined.leo b/compiler/tests/circuits/member_static_function_undefined.leo index 2de29b4464..8e34d19c42 100644 --- a/compiler/tests/circuits/member_static_function_undefined.leo +++ b/compiler/tests/circuits/member_static_function_undefined.leo @@ -1,9 +1,9 @@ -circuit Circ { +circuit Foo { static function echo(x: u32) -> u32 { return x } } function main() -> u32 { - return Circ::echoed(1u32) + return Foo::echoed(1u32) } \ No newline at end of file diff --git a/compiler/tests/circuits/mod.rs b/compiler/tests/circuits/mod.rs index 6f7589f1aa..46784d01e4 100644 --- a/compiler/tests/circuits/mod.rs +++ b/compiler/tests/circuits/mod.rs @@ -16,13 +16,13 @@ use leo_types::{Expression, Function, Identifier, Span, Statement, Type}; use snarkos_models::gadgets::utilities::uint::UInt32; -// Circ { x: 1u32 } +// Foo { x: 1u32 } fn output_circuit(program: EdwardsTestCompiler) { let output = get_output(program); assert_eq!( EdwardsConstrainedValue::Return(vec![ConstrainedValue::CircuitExpression( Identifier { - name: "Circ".to_string(), + name: "Foo".to_string(), span: Span { text: "".to_string(), line: 0, @@ -202,7 +202,7 @@ fn test_self_circuit() { let output = get_output(program); - // circuit Circ { + // circuit Foo { // static function new() -> Self { // return Self { } // } @@ -210,7 +210,7 @@ fn test_self_circuit() { assert_eq!( EdwardsConstrainedValue::Return(vec![ConstrainedValue::CircuitExpression( Identifier { - name: "Circ".to_string(), + name: "Foo".to_string(), span: Span { text: "".to_string(), line: 0, diff --git a/compiler/tests/circuits/self_circuit.leo b/compiler/tests/circuits/self_circuit.leo index cbee731017..6f87703c5d 100644 --- a/compiler/tests/circuits/self_circuit.leo +++ b/compiler/tests/circuits/self_circuit.leo @@ -1,9 +1,9 @@ -circuit Circ { +circuit Foo { static function new() -> Self { return Self { } } } -function main() -> Circ { - return Circ::new() +function main() -> Foo { + return Foo::new() } \ No newline at end of file diff --git a/compiler/tests/circuits/self_member.leo b/compiler/tests/circuits/self_member.leo index a1401e15d3..9e5701385e 100644 --- a/compiler/tests/circuits/self_member.leo +++ b/compiler/tests/circuits/self_member.leo @@ -7,6 +7,6 @@ circuit Foo { } function main() -> u32 { - let circuit = Foo { f: 1u32 }; - return circuit.bar() + let foo = Foo { f: 1u32 }; + return foo.bar() } \ No newline at end of file diff --git a/compiler/tests/circuits/self_member_fail.leo b/compiler/tests/circuits/self_member_fail.leo index 53050fcb5b..78f8811b5f 100644 --- a/compiler/tests/circuits/self_member_fail.leo +++ b/compiler/tests/circuits/self_member_fail.leo @@ -7,6 +7,6 @@ circuit Foo { } function main() -> u32 { - let circuit = Foo { f: 1u32 }; - return circuit.bar() + let foo = Foo { f: 1u32 }; + return foo.bar() } \ No newline at end of file diff --git a/compiler/tests/circuits/self_no_member_fail.leo b/compiler/tests/circuits/self_no_member_fail.leo index bfc5b57e31..6bafa9ae9d 100644 --- a/compiler/tests/circuits/self_no_member_fail.leo +++ b/compiler/tests/circuits/self_no_member_fail.leo @@ -5,6 +5,6 @@ circuit Foo { } function main() -> u32 { - let circuit = Foo { }; - return circuit.bar() + let foo = Foo { }; + return foo.bar() } \ No newline at end of file diff --git a/compiler/tests/function/multiple.leo b/compiler/tests/function/multiple.leo index 53439ef706..6f3ae01715 100644 --- a/compiler/tests/function/multiple.leo +++ b/compiler/tests/function/multiple.leo @@ -1,8 +1,8 @@ -function test() -> (bool, bool) { +function tuple() -> (bool, bool) { return (true, false) } function main() -> (bool, bool) { - let (a, b) = test(); + let (a, b) = tuple(); return (a, b) } \ No newline at end of file diff --git a/compiler/tests/function/repeated.leo b/compiler/tests/function/repeated.leo index cef685c9a8..542f405a3a 100644 --- a/compiler/tests/function/repeated.leo +++ b/compiler/tests/function/repeated.leo @@ -1,7 +1,7 @@ -function test() -> bool { +function one() -> bool { return true } function main() -> bool { - return test() && test() + return one() && one() } \ No newline at end of file diff --git a/compiler/tests/mutability/circuit.leo b/compiler/tests/mutability/circuit.leo index c8334eddd0..c7cd738b6b 100644 --- a/compiler/tests/mutability/circuit.leo +++ b/compiler/tests/mutability/circuit.leo @@ -1,9 +1,9 @@ // Circuits are immutable by default. -circuit Circ { +circuit Foo { x: u32 } function main() { - let a = Circ { x: 1 }; + let a = Foo { x: 1 }; a.x = 0; } \ No newline at end of file diff --git a/compiler/tests/mutability/circuit_mut.leo b/compiler/tests/mutability/circuit_mut.leo index bccf0ed82c..082b22b346 100644 --- a/compiler/tests/mutability/circuit_mut.leo +++ b/compiler/tests/mutability/circuit_mut.leo @@ -1,10 +1,10 @@ // Adding the `mut` keyword makes a circuit variable mutable. -circuit Circ { +circuit Foo { x: u32 } function main() -> u32 { - let mut a = Circ { x: 1 }; + let mut a = Foo { x: 1 }; a.x = 0; return a.x