Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remaining syntax highlighting test files #1668

Merged
merged 20 commits into from
Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add varlink syntax test file
  • Loading branch information
mohamed-abdelnour committed May 30, 2021
commit 117cd33c883787f2f1c087783b34daf7f3034936
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Interface to test varlink implementations against.
# First you write a varlink client calling:
# Start, Test01, Test02, …, Test09, End
# The return value of the previous call should be the argument of the next call.
# Then you test this client against well known servers like python or rust from
# https://github.com/varlink/
#
# Next you write a varlink server providing the same service as the well known ones.
# Now run your client against it and run well known clients like python or rust
# from https://github.com/varlink/ against your server. If all works out, then
# your new language bindings should be varlink certified.
interface org.varlink.certification

type Interface (
 foo: ?[]?[string](foo, bar, baz),
 anon: (foo: bool, bar: bool)
)

type MyType (
 object: object,
 enum: (one, two, three),
 struct: (first: int, second: string),
 array: []string,
 dictionary: [string]string,
 stringset: [string](),
 nullable: ?string,
 nullable_array_struct: ?[](first: int, second: string),
 interface: Interface
)

method Start() -> (client_id: string)

method Test01(client_id: string) -> (bool: bool)

method Test02(client_id: string, bool: bool) -> (int: int)

method Test03(client_id: string, int: int) -> (float: float)

method Test04(client_id: string, float: float) -> (string: string)

method Test05(client_id: string, string: string) -> (
 bool: bool,
 int: int,
 float: float,
 string: string
)

method Test06(
 client_id: string,
 bool: bool,
 int: int,
 float: float,
 string: string
) -> (
 struct: (
 bool: bool,
 int: int,
 float: float,
 string: string
 )
)

method Test07(
 client_id: string,
 struct: (
 bool: bool,
 int: int,
 float: float,
 string: string
 )
) -> (map: [string]string)

method Test08(client_id: string, map: [string]string) -> (set: [string]())

method Test09(client_id: string, set: [string]()) -> (mytype: MyType)

# returns more than one reply with "continues"
method Test10(client_id: string, mytype: MyType) -> (string: string)

# must be called as "oneway"
method Test11(client_id: string, last_more_replies: []string) -> ()

method End(client_id: string) -> (all_ok: bool)

error ClientIdError ()
error CertificationError (wants: object, got: object)
Loading