From 09c5253e1993093f075e6dca6c9b8ec0663bb800 Mon Sep 17 00:00:00 2001 From: Aaron Loucks Date: Tue, 7 May 2019 21:09:58 -0400 Subject: [PATCH] Update smoke test frame offset condition --- tests/smoke.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/smoke.rs b/tests/smoke.rs index 6d15b2846..e9671325f 100644 --- a/tests/smoke.rs +++ b/tests/smoke.rs @@ -42,7 +42,10 @@ fn smoke_test_frames() { // On 32-bit windows apparently the first frame isn't our backtrace // frame but it's actually this frame. I'm not entirely sure why, but at // least it seems consistent? - let o = if cfg!(all(windows, target_pointer_width = "32")) {1} else {0}; + let is_win32 = cfg!(all(windows, target_pointer_width = "32")); + let use_rtl_capture_backtrace = cfg!(feature = "kernel32"); + let o = if is_win32 && (MSVC || !use_rtl_capture_backtrace) {1} else {0}; + // frame offset 0 is the `backtrace::trace` function, but that's generic assert_frame(&v, o, 1, frame_4 as usize, "frame_4", "tests/smoke.rs", start_line + 6);