Skip to content

Commit

Permalink
Align several more bits of schema-schema json with the drifts made by…
Browse files Browse the repository at this point in the history
… the programatic type construction.

The gap between these isn't within the reach of this test to probe.
(Yet.  We'll get there.  It's not terribly much further.)
  • Loading branch information
warpfork committed Sep 10, 2020
1 parent da502e4 commit 2b7b3f0
Showing 1 changed file with 25 additions and 31 deletions.
56 changes: 25 additions & 31 deletions schema/gen/go/_demo/omg-schemas/schema/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestSchemaSchemaParse(t *testing.T) {
"SchemaMap": {
"map": {
"keyType": "TypeName",
"valueType": "Type"
"valueType": "TypeDefn"
}
},
"AdvancedDataLayoutName": {
Expand All @@ -67,25 +67,22 @@ func TestSchemaSchemaParse(t *testing.T) {
}
}
},
"Type": {
"TypeDefn": {
"union": {
"representation": {
"inline": {
"discriminantKey": "kind",
"discriminantTable": {
"bool": "TypeBool",
"string": "TypeString",
"bytes": "TypeBytes",
"int": "TypeInt",
"float": "TypeFloat",
"map": "TypeMap",
"list": "TypeList",
"link": "TypeLink",
"union": "TypeUnion",
"struct": "TypeStruct",
"enum": "TypeEnum",
"copy": "TypeCopy"
}
"keyed": {
"bool": "TypeBool",
"string": "TypeString",
"bytes": "TypeBytes",
"int": "TypeInt",
"float": "TypeFloat",
"map": "TypeMap",
"list": "TypeList",
"link": "TypeLink",
"union": "TypeUnion",
"struct": "TypeStruct",
"enum": "TypeEnum",
"copy": "TypeCopy"
}
}
}
Expand Down Expand Up @@ -217,7 +214,7 @@ func TestSchemaSchemaParse(t *testing.T) {
"type": "TypeName"
},
"valueType": {
"type": "TypeTerm"
"type": "TypeNameOrInlineDefn"
},
"valueNullable": {
"type": "Bool"
Expand Down Expand Up @@ -284,7 +281,7 @@ func TestSchemaSchemaParse(t *testing.T) {
"struct": {
"fields": {
"valueType": {
"type": "TypeTerm"
"type": "TypeNameOrInlineDefn"
},
"valueNullable": {
"type": "Bool"
Expand Down Expand Up @@ -464,7 +461,7 @@ func TestSchemaSchemaParse(t *testing.T) {
"struct": {
"fields": {
"type": {
"type": "TypeTerm"
"type": "TypeNameOrInlineDefn"
},
"optional": {
"type": "Bool"
Expand All @@ -487,25 +484,22 @@ func TestSchemaSchemaParse(t *testing.T) {
}
}
},
"TypeTerm": {
"TypeNameOrInlineDefn": {
"union": {
"representation": {
"kinded": {
"string": "TypeName",
"map": "InlineDefn"
"map": "TypeDefnInline"
}
}
}
},
"InlineDefn": {
"TypeDefnInline": {
"union": {
"representation": {
"inline": {
"discriminantKey": "kind",
"discriminantTable": {
"map": "TypeMap",
"list": "TypeList"
}
"keyed": {
"map": "TypeMap",
"list": "TypeList"
}
}
}
Expand Down Expand Up @@ -625,7 +619,7 @@ func TestSchemaSchemaParse(t *testing.T) {
"type": {
"map": {
"keyType": "EnumValue",
"valueType": "Null"
"valueType": "Unit"
}
}
},
Expand Down

0 comments on commit 2b7b3f0

Please sign in to comment.