From 24a63c7fc5a189428de5c01dbd779b93a05770b7 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Sat, 30 Nov 2024 15:02:33 +0300 Subject: [PATCH] Trying to repro a bug? --- tests/test_shared.cs | 2 +- tests/test_stack_trace.cs | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/tests/test_shared.cs b/tests/test_shared.cs index 9a9f08c0..6ef025e7 100644 --- a/tests/test_shared.cs +++ b/tests/test_shared.cs @@ -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); } diff --git a/tests/test_stack_trace.cs b/tests/test_stack_trace.cs index b76e1803..9fded68d 100644 --- a/tests/test_stack_trace.cs +++ b/tests/test_stack_trace.cs @@ -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; @@ -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 = @" @@ -320,9 +322,9 @@ coro func float test(float k) AssertTrue(vm.Tick()); AssertError( () => 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" );