Permalink
Browse files

Added a test for getting bases of ignored overrides in secondary bases.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
  • Loading branch information...
ddobrev committed Jul 26, 2017
1 parent 0124c43 commit 49104ee0bff352d5f2874480fbd02ad4ec751514
Showing with 51 additions and 0 deletions.
  1. +1 −0 tests/Common/Common.Tests.cs
  2. +32 −0 tests/Common/Common.cpp
  3. +18 −0 tests/Common/Common.h
@@ -45,6 +45,7 @@ public void TestCodeGeneration()
e = EnumWithUnderscores.UsesDigits1_0;
e.GetHashCode();
Common.SMallFollowedByCapital();
using (new DerivedFromSecondaryBaseWithIgnoredVirtualMethod()) {}
#pragma warning restore 0168
#pragma warning restore 0219
@@ -843,3 +843,35 @@ bool HasVirtualFunctionWithBoolParams::virtualFunctionWithBoolParamAndReturnsBoo
{
return testBool;
}
SecondaryBaseWithIgnoredVirtualMethod::SecondaryBaseWithIgnoredVirtualMethod()
{
}
SecondaryBaseWithIgnoredVirtualMethod::~SecondaryBaseWithIgnoredVirtualMethod()
{
}
void SecondaryBaseWithIgnoredVirtualMethod::generated()
{
}
void SecondaryBaseWithIgnoredVirtualMethod::ignored(const IgnoredType& ignoredParam)
{
}
DerivedFromSecondaryBaseWithIgnoredVirtualMethod::DerivedFromSecondaryBaseWithIgnoredVirtualMethod()
{
}
DerivedFromSecondaryBaseWithIgnoredVirtualMethod::~DerivedFromSecondaryBaseWithIgnoredVirtualMethod()
{
}
void DerivedFromSecondaryBaseWithIgnoredVirtualMethod::generated()
{
}
void DerivedFromSecondaryBaseWithIgnoredVirtualMethod::ignored(const IgnoredType& ignoredParam)
{
}
@@ -1327,3 +1327,21 @@ class HasProtectedCtorWithProtectedParam
};
HasProtectedCtorWithProtectedParam(ProtectedEnum protectedParam);
};
class DLL_API SecondaryBaseWithIgnoredVirtualMethod
{
public:
SecondaryBaseWithIgnoredVirtualMethod();
~SecondaryBaseWithIgnoredVirtualMethod();
virtual void generated();
virtual void ignored(const IgnoredType& ignoredParam);
};
class DLL_API DerivedFromSecondaryBaseWithIgnoredVirtualMethod : public Foo, public SecondaryBaseWithIgnoredVirtualMethod
{
public:
DerivedFromSecondaryBaseWithIgnoredVirtualMethod();
~DerivedFromSecondaryBaseWithIgnoredVirtualMethod();
void generated();
void ignored(const IgnoredType& ignoredParam);
};

0 comments on commit 49104ee

Please sign in to comment.