This commit is contained in:
GoEdgeLab
2024-07-27 15:42:58 +08:00
parent 7279dc873f
commit d7d0c8fbfe
490 changed files with 2158 additions and 738 deletions

View File

@@ -3,9 +3,10 @@
package utils_test
import (
"testing"
"github.com/TeaOSLab/EdgeAdmin/internal/utils"
"github.com/iwind/TeaGo/assert"
"testing"
)
func TestJSONClone(t *testing.T) {
@@ -25,11 +26,10 @@ func TestJSONClone(t *testing.T) {
}
}
func TestJSONIsNull(t *testing.T) {
var a = assert.NewAssertion(t)
a.IsTrue(utils.JSONIsNull(nil))
a.IsTrue(utils.JSONIsNull([]byte{}))
a.IsTrue(utils.JSONIsNull([]byte("null")))
a.IsFalse(utils.JSONIsNull([]byte{1, 2, 3}))
}
}