From 1069104eb696cc9f415ab861571b6a59cd129e21 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Mon, 6 Jul 2015 00:30:28 +0300 Subject: [PATCH] Added a test for interface impls not added if the interface has already been created. Signed-off-by: Dimitar Dobrev --- tests/CSharpTemp/CSharpTemp.Tests.cs | 8 ++++++++ tests/CSharpTemp/CSharpTemp.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/tests/CSharpTemp/CSharpTemp.Tests.cs b/tests/CSharpTemp/CSharpTemp.Tests.cs index 6de8c429..9448d413 100644 --- a/tests/CSharpTemp/CSharpTemp.Tests.cs +++ b/tests/CSharpTemp/CSharpTemp.Tests.cs @@ -14,6 +14,14 @@ public class CSharpTempTests : GeneratorTestFixture } } + [Test] + public void TestIncompilableCode() + { + using (new ForceCreationOfInterface()) + { + } + } + [Test] public void TestIndexer() { diff --git a/tests/CSharpTemp/CSharpTemp.h b/tests/CSharpTemp/CSharpTemp.h index be3b147b..ce78ce22 100644 --- a/tests/CSharpTemp/CSharpTemp.h +++ b/tests/CSharpTemp/CSharpTemp.h @@ -68,6 +68,10 @@ private: Bar::Bar() {} +class DLL_API ForceCreationOfInterface : public Foo, public Bar +{ +}; + class DLL_API Baz : public Foo, public Bar { public: