chore(aos): add compress graph
Go Bump / bump (push) Successful in 9s
Go Test / build (push) Failing after 24s

This commit is contained in:
xuu
2024-01-12 12:09:44 -07:00
parent 328a0f3eb3
commit 951c2c298a
6 changed files with 168 additions and 125 deletions
+27
View File
@@ -0,0 +1,27 @@
package aoc_test
func TestLCM(t *testing.T) {
is := is.New(t)
is.Equal(aoc.LCM([]int{}...), 0)
is.Equal(aoc.LCM(5), 5)
is.Equal(aoc.LCM(5, 3), 15)
is.Equal(aoc.LCM(5, 3, 2), 30)
}
func TestPower2(t *testing.T) {
is := is.New(t)
is.Equal(aoc.Power2(0), 1)
is.Equal(aoc.Power2(1), 2)
is.Equal(aoc.Power2(2), 4)
}
func TestABS(t *testing.T) {
is := is.New(t)
is.Equal(aoc.ABS(1), 1)
is.Equal(aoc.ABS(0), 0)
is.Equal(aoc.ABS(-1), 1)
}