Skip to content

Commit

Permalink
wit, testdata: use semicolons as delimiters in WIT text format
Browse files Browse the repository at this point in the history
  • Loading branch information
ydnar committed Oct 2, 2023
1 parent baa952d commit 1d2e964
Show file tree
Hide file tree
Showing 50 changed files with 538 additions and 538 deletions.
6 changes: 3 additions & 3 deletions testdata/comments.wit.json.golden.wit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package foo:comments
package foo:comments;

interface foo {
type bar = stream<x, _>
type x = u32
type bar = stream<x, _>;
type x = u32;
}
38 changes: 19 additions & 19 deletions testdata/complex-include.wit.json.golden.wit
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
package foo:bar
package foo:bar;

interface a {}

interface b {}

world bar-a {
import a
import b
import a;
import b;
}


package foo:baz
package foo:baz;

interface a {}

interface b {}

world baz-a {
import a
import b
import a;
import b;
}


package foo:root
package foo:root;

interface ai {}

interface bi {}

world a {
import ai
import bi
import ai;
import bi;
}

world b {
import foo:bar/a
import foo:bar/b
import foo:bar/a;
import foo:bar/b;
}

world c {
import foo:bar/a
import foo:bar/b
import foo:bar/a;
import foo:bar/b;
}

world union-world {
import foo:bar/a
import foo:bar/b
import foo:baz/a
import foo:baz/b
import ai
import bi
import foo:bar/a;
import foo:bar/b;
import foo:baz/a;
import foo:baz/b;
import ai;
import bi;
}
10 changes: 5 additions & 5 deletions testdata/cross-package-resource.wit.json.golden.wit
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package some:dep
package some:dep;

interface foo {
resource r {} // TODO: constructor, methods, and static functions
resource r {} // TODO: constructor, methods, and static functions;
}


package foo:bar
package foo:bar;

interface foo {
use some:dep/foo.{r}
type t = own<r>
use some:dep/foo.{r};
type t = own<r>;
}
10 changes: 5 additions & 5 deletions testdata/diamond1.wit.json.golden.wit
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package foo:dep1
package foo:dep1;

interface types {}


package foo:dep2
package foo:dep2;

interface types {}


package foo:foo
package foo:foo;

world foo {
import foo:dep1/types
import foo:dep2/types
import foo:dep1/types;
import foo:dep2/types;
}
18 changes: 9 additions & 9 deletions testdata/disambiguate-diamond.wit.json.golden.wit
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package foo:diamond
package foo:diamond;

interface shared1 {
type the-type = u32
type the-type = u32;
}

interface shared2 {
type the-type = u32
type the-type = u32;
}

world foo {
import interface bar {
use foo:diamond/shared2.{the-type}
}
use foo:diamond/shared2.{the-type};
};
import interface foo {
use foo:diamond/shared1.{the-type}
}
import shared1
import shared2
use foo:diamond/shared1.{the-type};
};
import shared1;
import shared2;
}
8 changes: 4 additions & 4 deletions testdata/embedded.wit.md.json.golden.wit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package foo:foo
package foo:foo;

interface foo {
x: func()
y: func()
z: func()
x: func();
y: func();
z: func();
}
2 changes: 1 addition & 1 deletion testdata/empty.wit.json.golden.wit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package foo:empty
package foo:empty;
70 changes: 35 additions & 35 deletions testdata/foreign-deps-union.wit.json.golden.wit
Original file line number Diff line number Diff line change
@@ -1,98 +1,98 @@
package foo:another-pkg
package foo:another-pkg;

interface other-interface {}


package foo:corp
package foo:corp;

interface saas {}


package foo:different-pkg
package foo:different-pkg;

interface i {}


package foo:foreign-pkg
package foo:foreign-pkg;

interface the-default {
type some-type = u32
type some-type = u32;
}


package foo:some-pkg
package foo:some-pkg;

interface another-interface {
type yet-another-type = u8
type yet-another-type = u8;
}

interface some-interface {
type another-type = u32
type another-type = u32;
}

interface the-default {
type from-default = string
type from-default = string;
}


package foo:wasi
package foo:wasi;

interface clocks {
type timestamp = u64
type timestamp = u64;
}

interface filesystem {
record stat { ino: u64 }
record stat { ino: u64 };
}

world wasi {
import clocks
import filesystem
import clocks;
import filesystem;
}


package foo:root
package foo:root;

interface bar {
use foo:some-pkg/some-interface.{another-type}
use foo:some-pkg/the-default.{from-default}
use foo:some-pkg/another-interface.{yet-another-type}
use foo:some-pkg/some-interface.{another-type};
use foo:some-pkg/the-default.{from-default};
use foo:some-pkg/another-interface.{yet-another-type};
}

interface foo {
use foo:wasi/filesystem.{stat}
use foo:wasi/clocks.{timestamp}
use foo:wasi/filesystem.{stat};
use foo:wasi/clocks.{timestamp};
}

interface use1 {
use foo:foreign-pkg/the-default.{some-type}
use foo:foreign-pkg/the-default.{some-type};
}

interface use2 {
use foo:foreign-pkg/the-default.{some-type}
use foo:foreign-pkg/the-default.{some-type};
}

world bars-world {
import foo:another-pkg/other-interface
import foo:some-pkg/the-default
import foo:another-pkg/other-interface;
import foo:some-pkg/the-default;
}

world my-world {
import foo:wasi/clocks
import foo:wasi/filesystem
export foo:corp/saas
import foo:wasi/clocks;
import foo:wasi/filesystem;
export foo:corp/saas;
}

world my-world2 {
import foo:wasi/clocks
import foo:wasi/filesystem
export foo:corp/saas
export foo
import foo:wasi/clocks;
import foo:wasi/filesystem;
export foo:corp/saas;
export foo;
}

world unionw-world {
import foo:wasi/clocks
import foo:wasi/filesystem
export foo:corp/saas
export foo
import foo:wasi/clocks;
import foo:wasi/filesystem;
export foo:corp/saas;
export foo;
}
Loading

0 comments on commit 1d2e964

Please sign in to comment.