Skip to content

Commit 3c226ee

Browse files
Brian Gianforcarobgianfo
authored andcommitted
Tests: Fix flaky module test, which assumed it would be loaded first
In the case of ASLR this is not always true, so we should not take a dependency on this behavior. Reported-by: John McPherson <[email protected]>>
1 parent 2e0b08f commit 3c226ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_module_api.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ TEST_CASE("DetourEnumerateModules", "[module]")
241241
auto mod = DetourEnumerateModules(nullptr);
242242

243243
REQUIRE( GetLastError() == NO_ERROR );
244-
REQUIRE( mod == reinterpret_cast<HMODULE>(&__ImageBase) );
244+
REQUIRE( mod != NULL );
245245
}
246246

247247
SECTION("Passing stack, results in module")

0 commit comments

Comments
 (0)