From 997de0e836f4f5f80a5f98a983b4f013ed38bdc4 Mon Sep 17 00:00:00 2001 From: Tom Spilman Date: Fri, 8 Aug 2014 17:56:21 -0500 Subject: [PATCH] Added test for static protected methods/properties. --- tests/Basic/Basic.Tests.cs | 1 + tests/Basic/Basic.h | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/tests/Basic/Basic.Tests.cs b/tests/Basic/Basic.Tests.cs index 43d9022c..013c08d7 100644 --- a/tests/Basic/Basic.Tests.cs +++ b/tests/Basic/Basic.Tests.cs @@ -264,6 +264,7 @@ public class BasicTests : GeneratorTestFixture public void TestStaticClasses() { Assert.That(TestStaticClass.Add(1, 2), Is.EqualTo(3)); + Assert.That(TestStaticClass.OneTwoThree, Is.EqualTo(123)); Assert.That(TestStaticClassDerived.Foo(), Is.EqualTo(0)); } diff --git a/tests/Basic/Basic.h b/tests/Basic/Basic.h index 8736b05f..160c129b 100644 --- a/tests/Basic/Basic.h +++ b/tests/Basic/Basic.h @@ -294,6 +294,14 @@ struct DLL_API TestStaticClass { static int Add(int a, int b); + static int GetOneTwoThree() { return 123; } + +protected: + + static int _Mult(int a, int b) { return a * b; } + + static int GetFourFiveSix() { return 456; } + private: TestStaticClass(); };