mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
mod operator tests
This commit is contained in:
parent
6afd7d50a6
commit
6a812f7293
@ -27,13 +27,13 @@ fn test_digits() {
|
|||||||
assert negative_digits[2] == -1
|
assert negative_digits[2] == -1
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
fn test_factorial() {
|
fn test_factorial() {
|
||||||
assert math.factorial(12) == 479001600
|
assert math.factorial(12) == 479001600
|
||||||
assert math.factorial(5) == 120
|
assert math.factorial(5) == 120
|
||||||
assert math.factorial(0) == 1
|
assert math.factorial(0) == 1
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
fn test_erf() {
|
fn test_erf() {
|
||||||
assert math.erf(0) == 0
|
assert math.erf(0) == 0
|
||||||
@ -48,3 +48,9 @@ fn test_gamma() {
|
|||||||
assert math.gamma(5) == 24
|
assert math.gamma(5) == 24
|
||||||
assert math.log_gamma(4.5) == math.log(math.gamma(4.5))
|
assert math.log_gamma(4.5) == math.log(math.gamma(4.5))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn test_mod() {
|
||||||
|
assert 4 % 2 == 0
|
||||||
|
x := 2
|
||||||
|
assert u64(5) % x == 1
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user