增加格式化数字函数

This commit is contained in:
GoEdgeLab
2022-01-03 12:04:09 +08:00
parent d64be92521
commit 3401e2cf54
2 changed files with 24 additions and 0 deletions

View File

@@ -14,3 +14,13 @@ func TestFormatBytes(t *testing.T) {
t.Log(FormatBytes(1_000_000_000_000_000_000))
t.Log(FormatBytes(9_000_000_000_000_000_000))
}
func TestFormatCount(t *testing.T) {
t.Log(FormatCount(1))
t.Log(FormatCount(1000))
t.Log(FormatCount(1500))
t.Log(FormatCount(1_000_000))
t.Log(FormatCount(1_500_000))
t.Log(FormatCount(1_000_000_000))
t.Log(FormatCount(1_500_000_000))
}