1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

feat: support type alias for Number constraint (#60)

This commit is contained in:
燕归来
2022-10-19 17:21:53 +08:00
committed by GitHub
parent 1ccf0af2b3
commit 5399c2290e
2 changed files with 4 additions and 1 deletions

View File

@@ -87,6 +87,9 @@ func TestMax(t *testing.T) {
assert.Equal(Max(0, 0), 0)
assert.Equal(Max(1, 2, 3), 3)
assert.Equal(Max(1.2, 1.4, 1.1, 1.4), 1.4)
type Integer int
assert.Equal(Max(Integer(1), Integer(0)), Integer(1))
}
func TestMaxBy(t *testing.T) {