mirror of https://github.com/mono/CppSharp.git
c-sharpdotnetmonobindingsbridgecclangcpluspluscppsharpglueinteropparserparsingpinvokeswigsyntax-treevisitorsxamarinxamarin-bindings
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.0 KiB
40 lines
1.0 KiB
using NamespacesDerived; |
|
using NUnit.Framework; |
|
|
|
[TestFixture] |
|
public class NamespaceDerivedTests |
|
{ |
|
[Test] |
|
public void TestCodeGeneration() |
|
{ |
|
using (new DerivedFromSecondaryBaseInDependency()) { } |
|
} |
|
|
|
[Test] |
|
public void TestNonRenamedMethod() |
|
{ |
|
using (var derived = new Derived()) |
|
{ |
|
var parent = derived.Parent; |
|
derived.parent(0); |
|
} |
|
} |
|
|
|
[Test] |
|
public void TestOverrideMethodFromDependency() |
|
{ |
|
using (var overrideMethodFromDependency = new OverrideMethodFromDependency()) |
|
{ |
|
using (var managedObject = new OverrideMethodFromDependency()) |
|
{ |
|
overrideMethodFromDependency.ManagedObject = managedObject; |
|
Assert.That(overrideMethodFromDependency.CallManagedOverride(), Is.EqualTo(2)); |
|
} |
|
} |
|
} |
|
|
|
private class OverrideMethodFromDependency : HasVirtualInDependency |
|
{ |
|
public override int VirtualInCore(int parameter) => 2; |
|
} |
|
} |