Skip to content

Commit f62f815

Browse files
committed
[Binding tests] Add test for mixing static and regular interface methods.
1 parent 7bf2216 commit f62f815

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests/DimBindingTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ public void TestChainedDefaultInterfaceMethods ()
8383
Assert.AreEqual (6, iface.InvokeFoo ());
8484
}
8585

86+
[Test]
87+
public void TestStaticInterfaceMethods ()
88+
{
89+
Assert.AreEqual (0, IDefaultMethodsInterface.StaticFoo ());
90+
}
91+
8692
class ManagedEmptyDefault : Java.Lang.Object, IDefaultMethodsInterface
8793
{
8894
}

tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests/java/com/xamarin/android/DefaultMethodsInterface.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ public interface DefaultMethodsInterface
77
default void setBar (int value) { }
88
default int toImplement () { throw new UnsupportedOperationException (); }
99
default int invokeFoo () { return foo (); }
10+
static int staticFoo () { return 0; }
1011
}

0 commit comments

Comments
 (0)