Add new integration test scenario 031
```
× clamp_1 failed
help: ┍━ left ━━━━━━━━━━┑
│ (con integer 0) │
┕━━━━━━━━━━━━━━━━━┙
should be equal to
┍━ right ━━━━━━━━━━┑
│ (con integer 10) │
┕━━━━━━━━━━━━━━━━━━┙
```
This commit is contained in:
13
examples/acceptance_tests/031/lib/test.ak
Normal file
13
examples/acceptance_tests/031/lib/test.ak
Normal file
@@ -0,0 +1,13 @@
|
||||
pub fn clamp(n: Int, min min: Int, max max: Int) -> Int {
|
||||
if n < min {
|
||||
min
|
||||
} else if n > max {
|
||||
max
|
||||
} else {
|
||||
n
|
||||
}
|
||||
}
|
||||
|
||||
test clamp_1() {
|
||||
clamp(14, min: 0, max: 10) == 10
|
||||
}
|
||||
Reference in New Issue
Block a user