1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/math/factorial_test.v
2021-08-23 00:35:28 +03:00

14 lines
271 B
V

module math
fn test_factorial() {
assert factorial(12) == 479001600
assert factorial(5) == 120
assert factorial(0) == 1
}
fn test_log_factorial() {
assert log_factorial(12) == log(479001600)
assert log_factorial(5) == log(120)
assert log_factorial(0) == log(1)
}