mirror of
https://github.com/FabInfra/capnproto-dotnetcore_Runtime.git
synced 2025-03-12 14:51:41 +01:00
Test forward-inherited types.
This commit is contained in:
parent
e543b62e2b
commit
28993b43a1
10
capnpc-csharp.tests/Properties/Resources.Designer.cs
generated
10
capnpc-csharp.tests/Properties/Resources.Designer.cs
generated
@ -69,5 +69,15 @@ namespace capnpc_csharp.Tests.Properties {
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] UnitTest2_capnp {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("UnitTest2_capnp", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -118,6 +118,9 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="UnitTest2_capnp" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\UnitTest2.capnp.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="UnitTest1_capnp" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\UnitTest1.capnp.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
|
BIN
capnpc-csharp.tests/Resources/UnitTest2.capnp.bin
Normal file
BIN
capnpc-csharp.tests/Resources/UnitTest2.capnp.bin
Normal file
Binary file not shown.
11
capnpc-csharp.tests/UnitTest2.capnp
Normal file
11
capnpc-csharp.tests/UnitTest2.capnp
Normal file
@ -0,0 +1,11 @@
|
||||
@0xf6041efc5e8b1e59;
|
||||
|
||||
interface Interface1(V1) {}
|
||||
|
||||
interface Interface {
|
||||
method @0 () -> (arg : AnyPointer);
|
||||
method1 @1 () -> (arg : Interface1(AnyPointer));
|
||||
method2 @2 () -> (arg : Interface2(AnyPointer));
|
||||
}
|
||||
|
||||
interface Interface2(V2) {}
|
@ -31,6 +31,15 @@ namespace CapnpC
|
||||
Assert.AreNotEqual(structFoo.Name, fieldName);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Test02ForwardInheritance()
|
||||
{
|
||||
var model = Load(Resources.UnitTest2_capnp);
|
||||
var codeGen = NewGeneratorFor(model);
|
||||
codeGen.Transform(model.FilesToGenerate.First());
|
||||
// Should not throw
|
||||
}
|
||||
|
||||
static Generator.CodeGenerator NewGeneratorFor(Model.SchemaModel model)
|
||||
=> new Generator.CodeGenerator(model, new Generator.GeneratorOptions());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user