Skip to content

Commit

Permalink
chore: enhance test coverage for the formatter (noir-lang#3180)
Browse files Browse the repository at this point in the history
  • Loading branch information
kek kek kek authored and Sakapoi committed Oct 19, 2023
1 parent 5065458 commit 692dca1
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 0 deletions.
46 changes: 46 additions & 0 deletions tooling/nargo_fmt/tests/expected/parens.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
fn main(x : u64, y : pub u64) {
(
//
1
);

(
// a
1
// b
);

(
// test
1
);

(
// 1
(
// 2
2
)
);

(/*a*/(
// test
1
)/*b*/);

(
// test
1
);

(/*a*/1);

(1/*b*/);

(/*c*/1/*d*/);

(/*test*/1/*test 2*/);

(());
(());
}
53 changes: 53 additions & 0 deletions tooling/nargo_fmt/tests/input/parens.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
fn main(x : u64, y : pub u64) {
(
//
1
);

(
// a
1
// b
);

(
// test
1
);

(
// 1
(
// 2
2
)
);

(

/*a*/

(

// test
1
)
/*b*/
);

(
// test
1
);

( /*a*/ 1 );

( 1 /*b*/ );

( /*c*/ 1 /*d*/ );

( /*test*/ 1 /*test 2*/ );

((()));
(((((((((((((((())))))))))))))));
}

0 comments on commit 692dca1

Please sign in to comment.