Add wxModule::AreInitialized()
This internal function will be useful to check if the modules are already initialized, i.e. if the library is in the "steady state" between the end of the initialization and the beginning of the cleanup phases.
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
#include "wx/module.h"
|
||||
#include "wx/wxcrt.h" // for wxStrcat()
|
||||
|
||||
static bool gs_wasInitialized = wxModule::AreInitialized();
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// test classes derived from wxModule
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -89,6 +91,12 @@ ModuleD::ModuleD()
|
||||
// tests themselves
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
TEST_CASE("wxModule::Initialized", "[module]")
|
||||
{
|
||||
CHECK( !gs_wasInitialized );
|
||||
CHECK( wxModule::AreInitialized() );
|
||||
}
|
||||
|
||||
TEST_CASE("wxModule::LoadOrder", "[module]")
|
||||
{
|
||||
// module D is the only one with no dependencies and so should load as first (and so on):
|
||||
|
Reference in New Issue
Block a user