Skip to content

Commit 342b29b

Browse files
committed
Added test case for bne bug
1 parent 25a8ffe commit 342b29b

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

TestCases/InheritanceTest.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,15 @@ public static void InheritanceTest_Interface()
7777
Console.WriteLine(cls3.ToString());
7878
cls3.TestAbstract();
7979
((InterfaceTest2)cls3).TestVirtual();
80+
Test_Interface_sub(cls3);
8081
cls3.TestField();
8182
}
8283

84+
static void Test_Interface_sub(InterfaceTest2 ins)
85+
{
86+
ins.TestVirtual();
87+
}
88+
8389
public static void InheritanceTest_Interface2()
8490
{
8591
ITest b = new TestB();
@@ -493,7 +499,7 @@ public class TestClass : Test<Data>
493499
{
494500
}
495501

496-
class TestCls5 : TestClass2
502+
internal class TestCls5 : TestClass2
497503
{
498504
public int bbbb;
499505
public override void VMethod3(ref int arg)
@@ -682,8 +688,12 @@ public override void TestVirtual()
682688
Console.WriteLine("This is TestCls2.TestVirtual");
683689
}
684690
}
691+
class TestCls3Base
692+
{
693+
694+
}
685695

686-
class TestCls3 : InterfaceTest2
696+
class TestCls3 : TestCls3Base, InterfaceTest2
687697
{
688698
int testVal;
689699

TestCases/LightTester1.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using ILRuntimeTest;
2+
using ILRuntimeTest.TestFramework;
23
using System;
34
using System.Collections.Generic;
45
using System.Linq;
@@ -478,5 +479,15 @@ static float UnitTest_1020Sub(long exp, long maxExp)
478479
Console.WriteLine("maxExp:" + maxExp + ",exp:" + exp + ", exp / maxExp:" + percent);
479480
return percent;
480481
}
482+
483+
public static void UnitTest_1021()
484+
{
485+
TestClass2 localData = null;
486+
TestClass2.Register(null);
487+
TestClass2 testData = TestClass2.Alloc();
488+
if(localData != testData)
489+
throw new Exception();
490+
491+
}
481492
}
482493
}

0 commit comments

Comments
 (0)