From 9242155a12bdb2027a5b88a8ef3f35ae96ab341c Mon Sep 17 00:00:00 2001 From: zc Date: Thu, 16 Nov 2023 17:51:18 +0800 Subject: [PATCH] add more case to reflect --- reflect_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reflect_test.go b/reflect_test.go index 627c078..92d50a2 100644 --- a/reflect_test.go +++ b/reflect_test.go @@ -136,7 +136,10 @@ func TestHonorJsonIgnore(t *testing.T) { assert.Equal(t, 0, len(obj.Properties), "expected zero exposed properties") } -func TestMakeSchema(t *testing.T) { +func TestMakeSchemaType(t *testing.T) { sliceSchema := MakeSchema([]string{}) assert.Equal(t, "array", sliceSchema.Type, "expect array type but get %s", sliceSchema.Type) + + objSchema := MakeSchema(struct{}{}) + assert.Equal(t, "", objSchema.Type, "expect array type but get %s", objSchema.Type) }