Skip to content

Commit 79a5694

Browse files
author
marisa
authored
fix: Rewrite test1 logic
1 parent 1e0b12e commit 79a5694

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

exercises/test1.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// - Functions
55

66
// Mary is buying apples. One apple usually costs 2 dollars, but if you buy
7-
// 40 or more at once, each apple only costs 1! Write a function that calculates
7+
// more than 40 at once, each apple only costs 1! Write a function that calculates
88
// the price of an order of apples given the order amount. No hints this time!
99

1010
// Put your function here!
@@ -13,9 +13,9 @@
1313
// Don't modify this function!
1414
#[test]
1515
fn verify_test() {
16-
let price1 = calculate_price(55);
17-
let price2 = calculate_price(40);
16+
let price1 = calculate_apple_price(35);
17+
let price2 = calculate_apple_price(65);
1818

19-
assert_eq!(55, price1);
20-
assert_eq!(80, price2);
19+
assert_eq!(70, price1);
20+
assert_eq!(65, price2);
2121
}

0 commit comments

Comments
 (0)