-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add CoreServices "smoke test" to check if initialization works
Before, CoreServices would cause a debug assertion when initializing it without other stuff from `MixxxMainWindow`. This is just a smoke test to verify that it's possible to initialize the `CoreServices` class on its own, without `MixxxMainWindow.
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include <gtest/gtest.h> | ||
|
||
#include "coreservices.h" | ||
#include "test/mixxxtest.h" | ||
#include "util/cmdlineargs.h" | ||
|
||
class CoreServicesTest : public MixxxTest { | ||
}; | ||
|
||
TEST_F(CoreServicesTest, TestInitialization) { | ||
// Initialize the app | ||
const int argc = 0; | ||
CmdlineArgs cmdlineArgs; | ||
cmdlineArgs.parse(argc, nullptr); | ||
|
||
const auto pCoreServices = std::make_unique<mixxx::CoreServices>(cmdlineArgs); | ||
pCoreServices->initializeSettings(); | ||
pCoreServices->initializeKeyboard(); | ||
pCoreServices->initialize(application()); | ||
|
||
EXPECT_NE(pCoreServices->getControllerManager(), nullptr); | ||
EXPECT_NE(pCoreServices->getEffectsManager(), nullptr); | ||
EXPECT_NE(pCoreServices->getGuiTick(), nullptr); | ||
EXPECT_NE(pCoreServices->getLV2Backend(), nullptr); | ||
EXPECT_NE(pCoreServices->getLibrary(), nullptr); | ||
EXPECT_NE(pCoreServices->getPlayerManager(), nullptr); | ||
EXPECT_NE(pCoreServices->getScreensaverManager(), nullptr); | ||
EXPECT_NE(pCoreServices->getSettingsManager(), nullptr); | ||
EXPECT_NE(pCoreServices->getSoundManager(), nullptr); | ||
EXPECT_NE(pCoreServices->getVinylControlManager(), nullptr); | ||
EXPECT_NE(pCoreServices->getVisualsManager(), nullptr); | ||
} |