File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
substrata-kotlin/src/androidTest/java/com/segment/analytics/substrata/kotlin Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -599,6 +599,29 @@ class EngineTests {
599599 assertNotNull(exception)
600600 }
601601
602+ @Test
603+ fun testIncompatibleParameters () {
604+ class MyJSClass {
605+ fun test (a : String? , b : String , c : JSValue , d : Int ): Int {
606+ return d
607+ }
608+ }
609+ scope.sync {
610+ export( " MyJSClass" , MyJSClass ::class )
611+ var res: Int = evaluate("""
612+ let o = MyJSClass()
613+ o.test(null, undefined, {}, 1234)
614+ """ ) as Int
615+ assertEquals(1234 , res)
616+
617+ res = evaluate("""
618+ o.test("a", "b", {}, 5678)
619+ """ ) as Int
620+ assertEquals(5678 , res)
621+ }
622+ assertNotNull(exception)
623+ }
624+
602625 @Test
603626 fun testAwait () {
604627 val ret = scope.await {
You can’t perform that action at this time.
0 commit comments