diff --git a/capnpc-csharp.tests/Properties/Resources.Designer.cs b/capnpc-csharp.tests/Properties/Resources.Designer.cs
index 65b57b9..7c7c2e9 100644
--- a/capnpc-csharp.tests/Properties/Resources.Designer.cs
+++ b/capnpc-csharp.tests/Properties/Resources.Designer.cs
@@ -60,6 +60,16 @@ namespace capnpc_csharp.Tests.Properties {
}
}
+ ///
+ /// Looks up a localized resource of type System.Byte[].
+ ///
+ internal static byte[] schema_with_offsets_capnp {
+ get {
+ object obj = ResourceManager.GetObject("schema_with_offsets_capnp", resourceCulture);
+ return ((byte[])(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Byte[].
///
diff --git a/capnpc-csharp.tests/Properties/Resources.resx b/capnpc-csharp.tests/Properties/Resources.resx
index 5c256ea..6d2bda3 100644
--- a/capnpc-csharp.tests/Properties/Resources.resx
+++ b/capnpc-csharp.tests/Properties/Resources.resx
@@ -133,4 +133,7 @@
..\Resources\UnitTest1.capnp.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ ..\Resources\schema-with-offsets.capnp.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
\ No newline at end of file
diff --git a/capnpc-csharp.tests/Resources/schema-with-offsets.capnp.bin b/capnpc-csharp.tests/Resources/schema-with-offsets.capnp.bin
new file mode 100644
index 0000000..1b61d19
Binary files /dev/null and b/capnpc-csharp.tests/Resources/schema-with-offsets.capnp.bin differ
diff --git a/capnpc-csharp.tests/UnitTests.cs b/capnpc-csharp.tests/UnitTests.cs
index 4c2966b..c009ddd 100644
--- a/capnpc-csharp.tests/UnitTests.cs
+++ b/capnpc-csharp.tests/UnitTests.cs
@@ -80,6 +80,15 @@ namespace CapnpC
// Should not throw
}
+ [TestMethod]
+ public void Test30SchemaCapnp()
+ {
+ var model = Load(Resources.schema_with_offsets_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());