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.
32 lines
642 B
32 lines
642 B
using System; |
|
using CppSharp.Utils; |
|
using NUnit.Framework; |
|
using VTables; |
|
|
|
public class FooDerived : Foo |
|
{ |
|
public override int vfoo() |
|
{ |
|
Console.WriteLine("Hello from FooDerived"); |
|
return 10; |
|
} |
|
} |
|
|
|
public class VTablesTests : GeneratorTestFixture |
|
{ |
|
[Test] |
|
public void TestFoo() |
|
{ |
|
var foo = new Foo(); |
|
Assert.That(foo.vfoo(), Is.EqualTo(5)); |
|
Assert.That(foo.Vbar(), Is.EqualTo(3)); |
|
Assert.That(foo.CallFoo(), Is.EqualTo(7)); |
|
|
|
var foo2 = new FooDerived(); |
|
Assert.That(foo2.CallFoo(), Is.EqualTo(12)); |
|
} |
|
|
|
static void Main(string[] args) |
|
{ |
|
} |
|
}
|
|
|