Skip to content

Commit

Permalink
Add a test for f32/f64.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Jan 4, 2024
1 parent b16e67e commit c2d5462
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 55 deletions.
6 changes: 4 additions & 2 deletions crates/wit-parser/tests/ui/types.wit
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ interface types {
type t6 = s16;
type t7 = s32;
type t8 = s64;
type t9 = float32;
type t10 = float64;
type t9a = float32;
type t9b = f32;
type t10a = float64;
type t10b = f64;
type t11 = char;
type t12 = list<char>;
type t13 = string;
Expand Down
126 changes: 73 additions & 53 deletions crates/wit-parser/tests/ui/types.wit.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,52 @@
"t6": 5,
"t7": 6,
"t8": 7,
"t9": 8,
"t10": 9,
"t11": 10,
"t12": 11,
"t13": 12,
"t14": 13,
"t15": 14,
"t16": 15,
"t17": 16,
"t18": 17,
"t20": 18,
"t21": 19,
"t22": 20,
"t23": 21,
"t24": 22,
"t25": 23,
"record": 24,
"t26": 25,
"t27": 26,
"t28": 27,
"t29": 28,
"t30": 29,
"t31": 30,
"t32": 31,
"t33": 32,
"t34": 33,
"t35": 34,
"t36": 35,
"t37": 37,
"t41": 38,
"t42": 39,
"t43": 40,
"t44": 41,
"t45": 44,
"t46": 45,
"t47": 46,
"t48": 47,
"t49": 48,
"t50": 49,
"t51": 50,
"t52": 51,
"t53": 52,
"bar": 53,
"foo": 54
"t9a": 8,
"t9b": 9,
"t10a": 10,
"t10b": 11,
"t11": 12,
"t12": 13,
"t13": 14,
"t14": 15,
"t15": 16,
"t16": 17,
"t17": 18,
"t18": 19,
"t20": 20,
"t21": 21,
"t22": 22,
"t23": 23,
"t24": 24,
"t25": 25,
"record": 26,
"t26": 27,
"t27": 28,
"t28": 29,
"t29": 30,
"t30": 31,
"t31": 32,
"t32": 33,
"t33": 34,
"t34": 35,
"t35": 36,
"t36": 37,
"t37": 39,
"t41": 40,
"t42": 41,
"t43": 42,
"t44": 43,
"t45": 46,
"t46": 47,
"t47": 48,
"t48": 49,
"t49": 50,
"t50": 51,
"t51": 52,
"t52": 53,
"t53": 54,
"bar": 55,
"foo": 56
},
"functions": {},
"package": 0
Expand Down Expand Up @@ -135,7 +137,7 @@
}
},
{
"name": "t9",
"name": "t9a",
"kind": {
"type": "float32"
},
Expand All @@ -144,7 +146,25 @@
}
},
{
"name": "t10",
"name": "t9b",
"kind": {
"type": "float32"
},
"owner": {
"interface": 0
}
},
{
"name": "t10a",
"kind": {
"type": "float64"
},
"owner": {
"interface": 0
}
},
{
"name": "t10b",
"kind": {
"type": "float64"
},
Expand Down Expand Up @@ -544,7 +564,7 @@
},
{
"name": "b",
"type": 36
"type": 38
}
]
}
Expand Down Expand Up @@ -616,21 +636,21 @@
{
"name": null,
"kind": {
"list": 31
"list": 33
},
"owner": null
},
{
"name": null,
"kind": {
"list": 42
"list": 44
},
"owner": null
},
{
"name": "t45",
"kind": {
"list": 43
"list": 45
},
"owner": {
"interface": 0
Expand All @@ -639,7 +659,7 @@
{
"name": "t46",
"kind": {
"type": 41
"type": 43
},
"owner": {
"interface": 0
Expand All @@ -648,7 +668,7 @@
{
"name": "t47",
"kind": {
"type": 41
"type": 43
},
"owner": {
"interface": 0
Expand Down Expand Up @@ -732,7 +752,7 @@
{
"name": "foo",
"kind": {
"type": 53
"type": 55
},
"owner": {
"interface": 0
Expand Down

0 comments on commit c2d5462

Please sign in to comment.