test: added tests for gradle utility functions (#892)
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
// because it interferes with the jni interface that emits such a signal on purpose
|
||||
|
||||
#include "ApplicationSettings.h"
|
||||
#include "language_packages.h"
|
||||
#include "utilityPathDetection.h"
|
||||
|
||||
struct EventListener: Catch::TestEventListenerBase
|
||||
{
|
||||
@@ -32,6 +34,18 @@ struct EventListener: Catch::TestEventListenerBase
|
||||
#else
|
||||
ApplicationSettings::getInstance()->load(FilePath(L"data/TestSettings.xml"));
|
||||
#endif
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
if (ApplicationSettings::getInstance()->getJavaPath().empty())
|
||||
{
|
||||
std::shared_ptr<PathDetector> pathDetector = utility::getJavaRuntimePathDetector();
|
||||
const std::vector<FilePath> paths = pathDetector->getPaths();
|
||||
if (!paths.empty())
|
||||
{
|
||||
ApplicationSettings::getInstance()->setJavaPath(paths.front());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user