Skip to content

Commit 2ff2286

Browse files
committed
test: cover WIT import name collisions in bindgen fixture
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
1 parent c8cfa11 commit 2ff2286

7 files changed

Lines changed: 56 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package a:b-c;
2+
3+
interface types {
4+
record bc-info {
5+
label: string,
6+
}
7+
get-bc-info: func() -> bc-info;
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package a:pkg;
2+
3+
interface types {
4+
record info {
5+
name: string,
6+
value: u32,
7+
}
8+
get-info: func() -> info;
9+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package a-b:c;
2+
3+
interface types {
4+
record ab-c-info {
5+
tag: string,
6+
}
7+
get-ab-c-info: func() -> ab-c-info;
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package b:pkg;
2+
3+
interface types {
4+
record detail {
5+
label: string,
6+
count: u64,
7+
}
8+
get-detail: func() -> detail;
9+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package c:pkg@1.0.0;
2+
3+
interface types {
4+
record info {
5+
value: u32,
6+
}
7+
get-info: func() -> info;
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package c:pkg@2.0.0;
2+
3+
interface types {
4+
record info {
5+
value: u32,
6+
}
7+
get-info: func() -> info;
8+
}

src/tests/rust_guests/witguest/bindgen-test-cases/world.wit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
package test:bindgen-test-cases;
22

33
world bindgen-test-cases {
4+
import a:pkg/types;
5+
import b:pkg/types;
6+
import c:pkg/types@1.0.0;
7+
import c:pkg/types@2.0.0;
8+
import a:b-c/types;
9+
import a-b:c/types;
410
export executor;
511
}
612

0 commit comments

Comments
 (0)