test.schema: drop interface & generic, regenerate

This commit is contained in:
David Lamparter 2016-03-19 00:46:05 +01:00
parent 7ecadefbfd
commit 4de69a555d
3 changed files with 785 additions and 1348 deletions

View file

@ -503,107 +503,6 @@ struct TestWholeFloatDefault {
const bigConstant :Float32 = 4e30;
}
struct TestGenerics(Foo, Bar) {
foo @0 :Foo;
rev @1 :TestGenerics(Bar, Foo);
struct Inner {
foo @0 :Foo;
bar @1 :Bar;
}
struct Inner2(Baz) {
bar @0 :Bar;
baz @1 :Baz;
innerBound @2 :Inner;
innerUnbound @3 :TestGenerics.Inner;
struct DeepNest(Qux) {
foo @0 :Foo;
bar @1 :Bar;
baz @2 :Baz;
qux @3 :Qux;
}
}
interface Interface(Qux) {
call @0 Inner2(Text) -> (qux :Qux, gen :TestGenerics(TestAllTypes, TestAnyPointer));
}
annotation ann(struct) :Foo;
using AliasFoo = Foo;
using AliasInner = Inner;
using AliasInner2 = Inner2;
using AliasInner2Text = Inner2(Text);
using AliasRev = TestGenerics(Bar, Foo);
struct UseAliases {
foo @0 :AliasFoo;
inner @1 :AliasInner;
inner2 @2 :AliasInner2;
inner2Bind @3 :AliasInner2(Text);
inner2Text @4 :AliasInner2Text;
revFoo @5 :AliasRev.AliasFoo;
}
}
struct TestGenericsWrapper(Foo, Bar) {
value @0 :TestGenerics(Foo, Bar);
}
struct TestGenericsWrapper2 {
value @0 :TestGenericsWrapper(Text, TestAllTypes);
}
interface TestImplicitMethodParams {
call @0 [T, U] (foo :T, bar :U) -> TestGenerics(T, U);
}
interface TestImplicitMethodParamsInGeneric(V) {
call @0 [T, U] (foo :T, bar :U) -> TestGenerics(T, U);
}
struct TestUseGenerics $TestGenerics(Text, Data).ann("foo") {
basic @0 :TestGenerics(TestAllTypes, TestAnyPointer);
inner @1 :TestGenerics(TestAllTypes, TestAnyPointer).Inner;
inner2 @2 :TestGenerics(TestAllTypes, TestAnyPointer).Inner2(Text);
unspecified @3 :TestGenerics;
unspecifiedInner @4 :TestGenerics.Inner2(Text);
wrapper @8 :TestGenericsWrapper(TestAllTypes, TestAnyPointer);
cap @18 :TestGenerics(TestInterface, Text);
genericCap @19 :TestGenerics(TestAllTypes, List(UInt32)).Interface(Data);
default @5 :TestGenerics(TestAllTypes, Text) =
(foo = (int16Field = 123), rev = (foo = "text", rev = (foo = (int16Field = 321))));
defaultInner @6 :TestGenerics(TestAllTypes, Text).Inner =
(foo = (int16Field = 123), bar = "text");
defaultUser @7 :TestUseGenerics = (basic = (foo = (int16Field = 123)));
defaultWrapper @9 :TestGenericsWrapper(Text, TestAllTypes) =
(value = (foo = "text", rev = (foo = (int16Field = 321))));
defaultWrapper2 @10 :TestGenericsWrapper2 =
(value = (value = (foo = "text", rev = (foo = (int16Field = 321)))));
aliasFoo @11 :TestGenerics(TestAllTypes, TestAnyPointer).AliasFoo = (int16Field = 123);
aliasInner @12 :TestGenerics(TestAllTypes, TestAnyPointer).AliasInner
= (foo = (int16Field = 123));
aliasInner2 @13 :TestGenerics(TestAllTypes, TestAnyPointer).AliasInner2
= (innerBound = (foo = (int16Field = 123)));
aliasInner2Bind @14 :TestGenerics(TestAllTypes, TestAnyPointer).AliasInner2(List(UInt32))
= (baz = [12, 34], innerBound = (foo = (int16Field = 123)));
aliasInner2Text @15 :TestGenerics(TestAllTypes, TestAnyPointer).AliasInner2Text
= (baz = "text", innerBound = (foo = (int16Field = 123)));
aliasRev @16 :TestGenerics(TestAnyPointer, Text).AliasRev.AliasFoo = "text";
useAliases @17 :TestGenerics(TestAllTypes, List(UInt32)).UseAliases = (
foo = (int16Field = 123),
inner = (foo = (int16Field = 123)),
inner2 = (innerBound = (foo = (int16Field = 123))),
inner2Bind = (baz = "text", innerBound = (foo = (int16Field = 123))),
inner2Text = (baz = "text", innerBound = (foo = (int16Field = 123))),
revFoo = [12, 34, 56]);
}
struct TestEmptyStruct {}
struct TestConstants {
@ -697,96 +596,6 @@ const derivedConstant :TestAllTypes = (
int16List = TestConstants.int16ListConst,
structList = TestConstants.structListConst);
const genericConstant :TestGenerics(TestAllTypes, Text) =
(foo = (int16Field = 123), rev = (foo = "text", rev = (foo = (int16Field = 321))));
interface TestInterface {
foo @0 (i :UInt32, j :Bool) -> (x :Text);
bar @1 () -> ();
baz @2 (s: TestAllTypes);
}
interface TestExtends extends(TestInterface) {
qux @0 ();
corge @1 TestAllTypes -> ();
grault @2 () -> TestAllTypes;
}
interface TestExtends2 extends(TestExtends) {}
interface TestPipeline {
getCap @0 (n: UInt32, inCap :TestInterface) -> (s: Text, outBox :Box);
testPointers @1 (cap :TestInterface, obj :AnyPointer, list :List(TestInterface)) -> ();
struct Box {
cap @0 :TestInterface;
}
}
interface TestCallOrder {
getCallSequence @0 (expected: UInt32) -> (n: UInt32);
# First call returns 0, next returns 1, ...
#
# The input `expected` is ignored but useful for disambiguating debug logs.
}
interface TestTailCallee {
struct TailResult {
i @0 :UInt32;
t @1 :Text;
c @2 :TestCallOrder;
}
foo @0 (i :Int32, t :Text) -> TailResult;
}
interface TestTailCaller {
foo @0 (i :Int32, callee :TestTailCallee) -> TestTailCallee.TailResult;
}
interface TestHandle {}
interface TestMoreStuff extends(TestCallOrder) {
# Catch-all type that contains lots of testing methods.
callFoo @0 (cap :TestInterface) -> (s: Text);
# Call `cap.foo()`, check the result, and return "bar".
callFooWhenResolved @1 (cap :TestInterface) -> (s: Text);
# Like callFoo but waits for `cap` to resolve first.
neverReturn @2 (cap :TestInterface) -> (capCopy :TestInterface);
# Doesn't return. You should cancel it.
hold @3 (cap :TestInterface) -> ();
# Returns immediately but holds on to the capability.
callHeld @4 () -> (s: Text);
# Calls the capability previously held using `hold` (and keeps holding it).
getHeld @5 () -> (cap :TestInterface);
# Returns the capability previously held using `hold` (and keeps holding it).
echo @6 (cap :TestCallOrder) -> (cap :TestCallOrder);
# Just returns the input cap.
expectCancel @7 (cap :TestInterface) -> ();
# evalLater()-loops forever, holding `cap`. Must be canceled.
methodWithDefaults @8 (a :Text, b :UInt32 = 123, c :Text = "foo") -> (d :Text, e :Text = "bar");
getHandle @9 () -> (handle :TestHandle);
# Get a new handle. Tests have an out-of-band way to check the current number of live handles, so
# this can be used to test garbage collection.
}
interface TestKeywordMethods {
delete @0 ();
class @1 ();
void @2 ();
return @3 ();
}
struct TestSturdyRef {
hostId @0 :TestSturdyRefHostId;
objectId @1 :AnyPointer;
@ -847,6 +656,3 @@ struct TestNameAnnotation $Cxx.name("RenamedStruct") {
}
}
interface TestNameAnnotationInterface $Cxx.name("RenamedInterface") {
badlyNamedMethod @0 (badlyNamedParam :UInt8 $Cxx.name("renamedParam")) $Cxx.name("renamedMethod");
}