public void StructSizeTests(string source, int expectedSize) { var c = new Compiler(); var chunk = new ByteCodeChunk(); var errors = c.CompileSource(chunk, null, TestHelper.CompilerMode, new Source(new Uri("source"), source)); Assert.Empty(errors.ToArray()); var type = new ValueType(TypeKind.Struct, chunk.structTypes.count - 1); var typeSize = type.GetSize(chunk); Assert.Equal(expectedSize, typeSize); }