Skip to content

Commit 4995bd4

Browse files
committed
Remove TODOs in tests that are now implemented.
1 parent 6107f67 commit 4995bd4

6 files changed

Lines changed: 198 additions & 51 deletions

File tree

crates/wac-parser/tests/resolution/import.wac

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import a: func();
55
type x = func();
66
import b: x;
77

8-
// TODO: Import by package path
8+
/// Import by package path
99
//import c: foo:bar/baz;
1010

1111
/// Import by func type with kebab name
@@ -16,5 +16,5 @@ import e: interface {
1616
x: func();
1717
};
1818

19-
// TODO: Import by package path with version
20-
//import f: foo:bar/baz@1.0.0;
19+
/// Import by package path with version
20+
import f: foo:bar/baz@1.0.0;

crates/wac-parser/tests/resolution/import.wac.result

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,39 @@
3434
}
3535
},
3636
"scope": 1
37+
},
38+
{
39+
"id": "foo:bar/baz",
40+
"exports": {},
41+
"scope": null
42+
}
43+
],
44+
"worlds": [
45+
{
46+
"imports": {},
47+
"exports": {
48+
"foo:bar/baz": {
49+
"kind": {
50+
"instance": 1
51+
}
52+
}
53+
},
54+
"scope": null
55+
},
56+
{
57+
"imports": {},
58+
"exports": {
59+
"baz": {
60+
"kind": {
61+
"type": {
62+
"world": 0
63+
}
64+
}
65+
}
66+
},
67+
"scope": null
3768
}
3869
],
39-
"worlds": [],
4070
"modules": []
4171
},
4272
"scopes": [
@@ -67,18 +97,25 @@
6797
}
6898
},
6999
"d": {
70-
"start": 200,
71-
"end": 201,
100+
"start": 195,
101+
"end": 196,
72102
"kind": {
73103
"func": 2
74104
}
75105
},
76106
"e": {
77-
"start": 281,
78-
"end": 282,
107+
"start": 276,
108+
"end": 277,
79109
"kind": {
80110
"instance": 0
81111
}
112+
},
113+
"f": {
114+
"start": 357,
115+
"end": 358,
116+
"kind": {
117+
"instance": 1
118+
}
82119
}
83120
}
84121
},
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package foo:bar;
2+
3+
interface baz {
4+
}

crates/wac-parser/tests/resolution/types.wac

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ type f = c;
2626

2727
/// Defining a world
2828
world w1 {
29-
// TODO: Use type r from foo:bar/i
30-
//use foo:bar/i.{r};
29+
/// Use type r from foo:bar/i
30+
use foo:bar/i.{r};
3131

3232
/// Import a function
3333
import a: func();
@@ -51,8 +51,8 @@ world w2 {
5151
/// Include the first world
5252
include w1;
5353

54-
// TODO: Include a world by path
55-
//include foo:bar/baz;
54+
/// Include a world by path
55+
include foo:bar/baz;
5656
}
5757

5858
/// Defining a resource

0 commit comments

Comments
 (0)