test/stubgen: add interface gen test
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
@0xa1a2a3a4a5a6a7a8;
|
||||||
|
|
||||||
|
struct Person {
|
||||||
|
name @0 :Text;
|
||||||
|
age @1 :Int32;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Status {
|
||||||
|
active @0;
|
||||||
|
inactive @1;
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
@0xb1b2b3b4b5b6b7b8;
|
||||||
|
|
||||||
|
using Import = import "base.capnp";
|
||||||
|
|
||||||
|
struct Team {
|
||||||
|
members @0 :List(Import.Person);
|
||||||
|
status @1 :Import.Status;
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
@0xa1b2c3d4e5f6a7b8;
|
||||||
|
|
||||||
|
interface Calculator {
|
||||||
|
evaluate @0 (expression :Text) -> (value :Float64);
|
||||||
|
add @1 (a :Float64, b :Float64) -> (result :Float64);
|
||||||
|
ping @2 () -> ();
|
||||||
|
}
|
||||||
|
|
||||||
|
struct CalcServer {
|
||||||
|
calc @0 :Calculator;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user