Browse Source

Added test for static protected methods/properties.

pull/304/head
Tom Spilman 12 years ago
parent
commit
997de0e836
  1. 1
      tests/Basic/Basic.Tests.cs
  2. 8
      tests/Basic/Basic.h

1
tests/Basic/Basic.Tests.cs

@ -264,6 +264,7 @@ public class BasicTests : GeneratorTestFixture @@ -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));
}

8
tests/Basic/Basic.h

@ -294,6 +294,14 @@ struct DLL_API TestStaticClass @@ -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();
};

Loading…
Cancel
Save