From 60b06b9c982c5c8e9c13f44d43a5d5f21d5b2464 Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Tue, 16 Oct 2018 17:25:35 +0200 Subject: [PATCH] [tests] make Symbols.FunctionNames aware of interpreter (#4973) --- tests/monotouch-test/mono/Symbols.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/monotouch-test/mono/Symbols.cs b/tests/monotouch-test/mono/Symbols.cs index df76e1edc2fc..87c73a63e1c1 100644 --- a/tests/monotouch-test/mono/Symbols.cs +++ b/tests/monotouch-test/mono/Symbols.cs @@ -26,7 +26,13 @@ public void FunctionNames () Assert.Ignore ("This is a device-only test."); Collect (); - Assert.That (symbols [1], Contains.Substring ("MonoTouchFixtures_Symbols_Collect"), "#1"); + bool aot = symbols [1].Contains ("MonoTouchFixtures_Symbols_Collect"); + /* ves_pinvoke_method (slow path) and do_icall (fast path) are + * MONO_NEVER_INLINE, so they should show up in the backtrace + * reliably */ + bool interp = symbols [1].Contains ("ves_pinvoke_method") || symbols [1].Contains ("do_icall"); + + Assert.IsTrue (aot || interp, "#1"); } void Collect ()