Skip to content

Commit

Permalink
Merge pull request #33 from zc2638/test/reflect
Browse files Browse the repository at this point in the history
add more case to reflect
  • Loading branch information
zc2638 authored Nov 17, 2023
2 parents c199946 + 9242155 commit 5e11e8d
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 5e11e8d

Please sign in to comment.