Fix tests on Windows in no pch mode.
This was SVN commit r24363.
This commit is contained in:
parent
c9695dd669
commit
b6114adc8d
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010 Wildfire Games.
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@ -59,7 +59,7 @@ static Status OnFrame(const _tagSTACKFRAME64* frame, uintptr_t UNUSED(cbData))
|
||||
__declspec(noinline) static void Func1()
|
||||
{
|
||||
CONTEXT context;
|
||||
(void)debug_CaptureContext(&context);
|
||||
debug_CaptureContext(&context);
|
||||
wdbg_sym_WalkStack(OnFrame, 0, context);
|
||||
}
|
||||
|
||||
@ -76,7 +76,10 @@ __declspec(noinline) static void Func3()
|
||||
|
||||
class TestWdbgSym : public CxxTest::TestSuite
|
||||
{
|
||||
static void m_test_array()
|
||||
// m_test_array might get inlined and that messes
|
||||
// with the test so in order to protect the stack
|
||||
// trace we have to prevent it.
|
||||
__declspec(noinline) static void m_test_array()
|
||||
{
|
||||
struct Small
|
||||
{
|
||||
@ -109,7 +112,7 @@ class TestWdbgSym : public CxxTest::TestSuite
|
||||
// amount of text (not just "(failed)" error messages) was produced.
|
||||
ErrorMessageMem emm = {0};
|
||||
CACHE_ALIGNED(u8) context[DEBUG_CONTEXT_SIZE];
|
||||
(void)debug_CaptureContext(context);
|
||||
TS_ASSERT(debug_CaptureContext(context) == INFO::OK);
|
||||
const wchar_t* text = debug_BuildErrorMessage(L"dummy", 0,0,0, context, L"m_test_array", &emm);
|
||||
TS_ASSERT(wcslen(text) > 500);
|
||||
#if 0
|
||||
|
Loading…
Reference in New Issue
Block a user