Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kek kek kek committed Oct 22, 2023
1 parent 492d3f1 commit daa3ad9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tooling/nargo_fmt/tests/expected/let.nr
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,32 @@ fn let_() {
1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
]
};

let person = Person {
first_name: "John",
last_name: "Doe",
home_address: Address { street: "123 Main St", city: "Exampleville", zip_code: "12345" }
};

let person = Person {
first_name: "John",
last_name: "Doe",
home_address: Address {
street: "123 Main St",
city: "Exampleville",
zip_code: "12345",
master: Person {
first_name: "John",
last_name: "Doe",
home_address: Address { street: "123 Main St", city: "Exampleville", zip_code: "12345" }
}
}
};

let expr = Expr {
// A boolean literal (true, false).
kind: ExprKind::Bool(true)
};

let expr = Expr { /*A boolean literal (true, false).*/ kind: ExprKind::Bool(true) };
}
10 changes: 10 additions & 0 deletions tooling/nargo_fmt/tests/input/let.nr
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,14 @@ fn let_() {
];

let a = BigUint56 {limbs:[1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]};

let person = Person { first_name: "John", last_name: "Doe", home_address: Address { street: "123 Main St", city: "Exampleville", zip_code: "12345" } };

let person = Person { first_name: "John", last_name: "Doe", home_address: Address { street: "123 Main St", city: "Exampleville", zip_code: "12345", master: Person { first_name: "John", last_name: "Doe", home_address: Address { street: "123 Main St", city: "Exampleville", zip_code: "12345" } } } };

let expr = Expr {// A boolean literal (true, false).
kind: ExprKind::Bool(true),
};

let expr = Expr {/*A boolean literal (true, false).*/kind: ExprKind::Bool(true),};
}

0 comments on commit daa3ad9

Please sign in to comment.