From 349f8b6c97f535243ddcda5ed569ba96b0c324c8 Mon Sep 17 00:00:00 2001 From: dudaodong Date: Thu, 27 Jan 2022 10:55:37 +0800 Subject: [PATCH] test: add some cases for convertor test --- .gitignore | 3 ++- convertor/convertor_test.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index fce5a7c..6210f5f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ fileutil/*.txt fileutil/*.zip fileutil/*.link fileutil/unzip/* -cryptor/*.pem \ No newline at end of file +cryptor/*.pem +docs/* \ No newline at end of file diff --git a/convertor/convertor_test.go b/convertor/convertor_test.go index b7fedca..90b0d6d 100644 --- a/convertor/convertor_test.go +++ b/convertor/convertor_test.go @@ -24,8 +24,8 @@ func TestToChar(t *testing.T) { func TestToBool(t *testing.T) { assert := internal.NewAssert(t, "TestToBool") - cases := []string{"true", "True", "false", "False", "0", "1", "123"} - expected := []bool{true, true, false, false, false, true, false} + cases := []string{"1", "true", "True", "false", "False", "0", "123", "0.0", "abc"} + expected := []bool{true, true, true, false, false, false, false, false, false} for i := 0; i < len(cases); i++ { actual, _ := ToBool(cases[i])