Skip to content

Commit 49d64ee

Browse files
committed
less verbose tests
1 parent 095e87a commit 49d64ee

File tree

1 file changed

+7
-21
lines changed
  • noir-projects/noir-contracts/contracts/app/orderbook_contract/src/test

1 file changed

+7
-21
lines changed

noir-projects/noir-contracts/contracts/app/orderbook_contract/src/test/test.nr

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,15 @@ unconstrained fn full_flow() {
9494
unconstrained fn create_order_zero_bid_amount() {
9595
let (mut env, orderbook_address, token0_address, token1_address, _minter) = setup();
9696

97-
// We create a light account for the maker (as opposed to a contract account) since we are not using authwits here.
98-
let maker = env.create_light_account();
99-
10097
let orderbook = Orderbook::at(orderbook_address);
101-
102-
let bid_amount = 0 as u128;
98+
let maker = env.create_light_account();
10399

104100
let _ = env.call_private(
105101
maker,
106102
orderbook.create_order(
107103
token0_address,
108104
token1_address,
109-
bid_amount,
105+
0,
110106
ASK_AMOUNT,
111107
CREATE_ORDER_AUTHWIT_NONCE,
112108
),
@@ -117,20 +113,16 @@ unconstrained fn create_order_zero_bid_amount() {
117113
unconstrained fn create_order_zero_ask_amount() {
118114
let (mut env, orderbook_address, token0_address, token1_address, _minter) = setup();
119115

120-
// We create a light account for the maker (as opposed to a contract account) since we are not using authwits here.
121116
let maker = env.create_light_account();
122-
123117
let orderbook = Orderbook::at(orderbook_address);
124118

125-
let ask_amount = 0 as u128;
126-
127-
let _order_id = env.call_private(
119+
let _ = env.call_private(
128120
maker,
129121
orderbook.create_order(
130122
token0_address,
131123
token1_address,
132124
BID_AMOUNT,
133-
ask_amount,
125+
0,
134126
CREATE_ORDER_AUTHWIT_NONCE,
135127
),
136128
);
@@ -140,14 +132,12 @@ unconstrained fn create_order_zero_ask_amount() {
140132
unconstrained fn create_order_invalid_bid_token() {
141133
let (mut env, orderbook_address, _token0_address, token1_address, _minter) = setup();
142134

143-
// We create a light account for the maker (as opposed to a contract account) since we are not using authwits here.
144135
let maker = env.create_light_account();
145-
146136
let orderbook = Orderbook::at(orderbook_address);
147137

148138
let invalid_token = AztecAddress::from_field(999);
149139

150-
let _order_id = env.call_private(
140+
let _ = env.call_private(
151141
maker,
152142
orderbook.create_order(
153143
invalid_token,
@@ -163,14 +153,12 @@ unconstrained fn create_order_invalid_bid_token() {
163153
unconstrained fn create_order_invalid_ask_token() {
164154
let (mut env, orderbook_address, token0_address, _token1_address, _minter) = setup();
165155

166-
// We create a light account for the maker (as opposed to a contract account) since we are not using authwits here.
167156
let maker = env.create_light_account();
168-
169157
let orderbook = Orderbook::at(orderbook_address);
170158

171159
let invalid_token = AztecAddress::from_field(999);
172160

173-
let _order_id = env.call_private(
161+
let _ = env.call_private(
174162
maker,
175163
orderbook.create_order(
176164
token0_address,
@@ -186,12 +174,10 @@ unconstrained fn create_order_invalid_ask_token() {
186174
unconstrained fn create_order_same_tokens() {
187175
let (mut env, orderbook_address, token0_address, _token1_address, _minter) = setup();
188176

189-
// We create a light account for the maker (as opposed to a contract account) since we are not using authwits here.
190177
let maker = env.create_light_account();
191-
192178
let orderbook = Orderbook::at(orderbook_address);
193179

194-
let _order_id = env.call_private(
180+
let _ = env.call_private(
195181
maker,
196182
orderbook.create_order(
197183
token0_address,

0 commit comments

Comments
 (0)