implements input on stdlib
This commit is contained in:
+7
-1
@@ -94,9 +94,10 @@ class PbsGateUSdkInterfaceConformanceTest {
|
||||
"""
|
||||
import { Color } from @core:color;
|
||||
import { Gfx } from @sdk:gfx;
|
||||
import { Input, InputPad, InputButton } from @sdk:input;
|
||||
|
||||
declare contract Renderer {
|
||||
fn render(gfx: Gfx, color: Color) -> void;
|
||||
fn render(gfx: Gfx, color: Color, input: Input, pad: InputPad, button: InputButton) -> void;
|
||||
}
|
||||
""",
|
||||
"pub contract Renderer;",
|
||||
@@ -108,6 +109,11 @@ class PbsGateUSdkInterfaceConformanceTest {
|
||||
d.getCode().equals(PbsLinkErrors.E_LINK_IMPORT_SYMBOL_UNRESOLVED.name())));
|
||||
assertTrue(positive.irBackend().getReservedMetadata().builtinTypeSurfaces().stream()
|
||||
.anyMatch(t -> t.sourceTypeName().equals("Color")));
|
||||
assertTrue(positive.irBackend().getReservedMetadata().builtinTypeSurfaces().stream()
|
||||
.anyMatch(t -> t.sourceTypeName().equals("Input") && t.canonicalTypeName().equals("input")));
|
||||
assertTrue(positive.irBackend().getReservedMetadata().builtinTypeSurfaces().stream()
|
||||
.anyMatch(t -> t.sourceTypeName().equals("InputButton")
|
||||
&& t.intrinsics().stream().anyMatch(i -> i.canonicalName().equals("hold"))));
|
||||
assertTrue(positive.irBackend().getReservedMetadata().hostMethodBindings().stream()
|
||||
.anyMatch(h -> h.ownerName().equals("Gfx")));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user