From c5dfe16ec37b1ec67ea8b6c6828dbf09976bd147 Mon Sep 17 00:00:00 2001 From: pengchen Date: Mon, 11 Dec 2023 18:13:56 +0800 Subject: [PATCH] support int type alias: add test --- cast_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cast_test.go b/cast_test.go index 409b7d9..ecc37d4 100644 --- a/cast_test.go +++ b/cast_test.go @@ -30,6 +30,12 @@ func createNumberTestSteps(zero, one, eight, eightnegative, eightpoint31, eightp _ = json.Unmarshal([]byte("-8"), &jminuseight) _ = json.Unmarshal([]byte("8.0"), &jfloateight) + // alias + type aliasType int + const ( + eightAliasType aliasType = 8 + ) + kind := reflect.TypeOf(zero).Kind() isUint := kind == reflect.Uint || kind == reflect.Uint8 || kind == reflect.Uint16 || kind == reflect.Uint32 || kind == reflect.Uint64 @@ -1222,9 +1228,3 @@ func locationEqual(a, b *time.Location) bool { return tA.Equal(tB) } - -type BizType int - -const ( - eightAliasType BizType = 8 -)