Working on a testing method

This commit is contained in:
2025-05-26 22:28:31 +02:00
parent b61518de00
commit c8e72dbba8
10 changed files with 130 additions and 10 deletions

7
examples/import.jrpc Normal file
View File

@ -0,0 +1,7 @@
import "./import";
type TestAtom {
val_number?: float;
val_boolean?: boolean;
val_string?: string;
}

75
examples/test.jrpc Normal file
View File

@ -0,0 +1,75 @@
// Test
import "./import";
define csharp_namespace Example;
define rust_crate example;
define dart_library_name example;
enum TestEnum {
VAL1,
VAL2,
VAL10 = 10,
VAL11,
VAL12
}
type Test {
atom: TestAtom;
array: TestAtom[];
enumValue: TestEnum;
map: {int, TestAtom};
}
type AddValueRequest {
value1: float;
value2: float;
}
type AddValueResponse {
value: float;
}
service TestService {
@Description("Add two numbers")
@Param("request", "Parameter containing the two numbers")
@Returns("")
AddValuesSingleParam(request: AddValueRequest): AddValueResponse;
@Description("Add two numbers")
@Param("value1", "The first value")
@Param("value2", "The second value")
AddValuesMultipleParams(value1: float, value2: float): float;
@Description("Does literaly nothing")
@Param("param1", "Some number")
ReturningVoid(param1: float): void;
@Description("Just sends an Event with a String")
@Param("param1", "Parameter with some string for event")
notification OnEvent(param1: string);
ThrowingError(): void;
FunctionWithArrayAsParamAndReturn(values1: float[], values2: float[]): float[];
FunctionWithKeywords(_type: float, static: float, event: float): float;
}
type Test2 {
name: string;
age: int;
}
type TestKeywords {
type: float;
static: float;
event: float;
}
service SimpleTestService {
@Description("asdasdasd")
GetTest(name: string, age: int): Test2;
notification TestNot();
}