Skip to content

Commit

Permalink
Adding more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pachanga committed Jul 22, 2024
1 parent f3cab35 commit a48c284
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/test_class.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1812,6 +1812,31 @@ func int test()
CommonChecks(vm);
}

[IsTested()]
public void TestStaticMethodCallsStaticFieldWithoutPrefix()
{
string bhl = @"
class Bar {
static int b
static func int foo() {
return b
}
}
func int test()
{
Bar.b = 42
return Bar.foo()
}
";

var vm = MakeVM(bhl);
AssertEqual(42, Execute(vm, "test").result.PopRelease().num);
CommonChecks(vm);
}

[IsTested()]
public void TestUserChildClassMethod()
{
Expand Down

0 comments on commit a48c284

Please sign in to comment.