mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vlib: update and cleanup tests + fix PR template
This commit is contained in:
committed by
Alexander Medvednikov
parent
2dccdd347f
commit
f4f1622528
@@ -1,9 +1,15 @@
|
||||
import math
|
||||
|
||||
fn test_gcd_and_lcm() {
|
||||
fn test_gcd() {
|
||||
assert math.gcd(6, 9) == 3
|
||||
assert math.gcd(6, -9) == 3
|
||||
assert math.gcd(-6, -9) == 3
|
||||
assert math.gcd(0, 0) == 0
|
||||
}
|
||||
|
||||
fn test_lcm() {
|
||||
assert math.lcm(2, 3) == 6
|
||||
assert math.lcm(-2, 3) == 6
|
||||
assert math.lcm(-2, -3) == 6
|
||||
assert math.lcm(0, 0) == 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user