Skip to content

Commit 09ac175

Browse files
author
jennybuckley
committed
Fix test
1 parent a0a5303 commit 09ac175

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

schema/fromvalue_test.go

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,22 @@ func TestTypeRefFromValue(t *testing.T) {
3131
objYAML string
3232
typeRef string
3333
}{
34-
{`a: a`, `
35-
struct:
34+
{
35+
objYAML: `[1.0]`,
36+
typeRef: `untyped: {}`,
37+
}, {
38+
objYAML: `null`,
39+
typeRef: `untyped: {}`,
40+
}, {
41+
objYAML: `a: a`,
42+
typeRef: `struct:
3643
fields:
3744
- name: a
3845
type:
39-
untyped: {}`},
40-
{`{"a": [{"a": null}]}`, `
41-
struct:
42-
fields:
43-
- name: a
44-
type:
45-
untyped: {}`},
46-
{`{"a": null}`, `
47-
struct:
48-
fields:
49-
- name: a
50-
type:
51-
untyped: {}`},
52-
{`{"q": {"y": 6, "b": [7, 8, 9]}}`, `
53-
struct:
46+
untyped: {}`,
47+
}, {
48+
objYAML: `{"q": {"y": 6, "b": [7, 8, 9]}}`,
49+
typeRef: `struct:
5450
fields:
5551
- name: q
5652
type:
@@ -61,7 +57,8 @@ struct:
6157
untyped: {}
6258
- name: b
6359
type:
64-
untyped: {}`},
60+
untyped: {}`,
61+
},
6562
}
6663

6764
for _, tt := range table {

0 commit comments

Comments
 (0)