Skip to content

Commit

Permalink
add more case to reflect
Browse files Browse the repository at this point in the history
  • Loading branch information
zc2638 committed Nov 16, 2023
1 parent c199946 commit 9242155
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion reflect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 9242155

Please sign in to comment.