Skip to content

Commit

Permalink
Trying to repro a bug?
Browse files Browse the repository at this point in the history
  • Loading branch information
pachanga committed Nov 30, 2024
1 parent a2accaf commit 24a63c7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/test_shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ public void AssertError(Exception err, string msg, PlaceAssert place_assert = nu
var idx = err_str.IndexOf(msg);
if(idx == -1)
{
Console.WriteLine("Error:\n" + err_str);
Console.WriteLine("Actual:\n" + err_str);
Console.WriteLine("Expected:\n" + msg);
}

Expand Down
24 changes: 13 additions & 11 deletions tests/test_stack_trace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,19 +258,11 @@ coro func test(float b) {
yield this.wow(b)
}
}
class Foo : Base
{
coro override func float wow(float b)
{
yield()
fatal_error()
return b
}
}
";

string bhl2 = @"
import ""bhl3""
coro func float bar(float b)
{
Base bs = new Foo;
Expand All @@ -281,6 +273,16 @@ yield bs.test(b)
}
return b
}
class Foo : Base
{
coro override func float wow(float b)
{
yield()
fatal_error()
return b
}
}
";

string bhl1 = @"
Expand Down Expand Up @@ -320,9 +322,9 @@ coro func float test(float k)
AssertTrue(vm.Tick());
AssertError<Exception>(
() => vm.Tick(),
@"at wow(..) in bhl3.bhl:18
@"at wow(..) in bhl2.bhl:20
at test(..) in bhl3.bhl:10
at bar(..) in bhl2.bhl:9
at bar(..) in bhl2.bhl:10
at foo(..) in bhl1.bhl:5
at test(..) in bhl1.bhl:10"
);
Expand Down

0 comments on commit 24a63c7

Please sign in to comment.