summaryrefslogtreecommitdiff
path: root/project2/basics
diff options
context:
space:
mode:
Diffstat (limited to 'project2/basics')
-rw-r--r--project2/basics/options/preload.cpp4
-rw-r--r--project2/basics/unittests/testLibraries.cpp5
-rw-r--r--project2/basics/unittests/testViews.cpp5
3 files changed, 12 insertions, 2 deletions
diff --git a/project2/basics/options/preload.cpp b/project2/basics/options/preload.cpp
index f871e57..5cf42e8 100644
--- a/project2/basics/options/preload.cpp
+++ b/project2/basics/options/preload.cpp
@@ -1,7 +1,7 @@
#include <pch.hpp>
#include <options.h>
#include <library.h>
-#include <scripts.h>
+#include <appInstance.h>
#include <boost/filesystem/path.hpp>
#include <map>
#include <dlfcn.h>
@@ -42,7 +42,7 @@ class Preload {
static void UnloadLibraries()
{
- ScriptReader::clearCache();
+ AppInstance::current().clearScriptCache();
libs.clear();
}
diff --git a/project2/basics/unittests/testLibraries.cpp b/project2/basics/unittests/testLibraries.cpp
index c7aac5a..b77b671 100644
--- a/project2/basics/unittests/testLibraries.cpp
+++ b/project2/basics/unittests/testLibraries.cpp
@@ -4,9 +4,12 @@
#include <testOptionsSource.h>
#include <exceptions.h>
#include <library.h>
+#include <appInstance.h>
const auto self = boost::filesystem::canonical("/proc/self/exe");
+BOOST_FIXTURE_TEST_SUITE( Core, AppInstance );
+
BOOST_AUTO_TEST_CASE( load_missing_library )
{
BOOST_TEST_CHECKPOINT("Configure (load)");
@@ -32,3 +35,5 @@ BOOST_AUTO_TEST_CASE( load_and_unload_library )
BOOST_REQUIRE_THROW(ElementLoader::getFor("DummyTask"), NotSupported);
}
+BOOST_AUTO_TEST_SUITE_END();
+
diff --git a/project2/basics/unittests/testViews.cpp b/project2/basics/unittests/testViews.cpp
index 8230ab9..a74c9e3 100644
--- a/project2/basics/unittests/testViews.cpp
+++ b/project2/basics/unittests/testViews.cpp
@@ -5,6 +5,7 @@
#include <testOptionsSource.h>
#include <testScriptHost.h>
#include <definedDirs.h>
+#include <appInstance.h>
boost::intrusive_ptr<TestScriptHost>
executeRowViewTest(const boost::filesystem::path & script, const boost::filesystem::path & expected)
@@ -23,6 +24,8 @@ executeRowViewTest(const boost::filesystem::path & script, const boost::filesyst
return sr;
}
+BOOST_FIXTURE_TEST_SUITE( Core, AppInstance );
+
BOOST_AUTO_TEST_CASE( test_rowview_unsetcolumns )
{
executeRowViewTest(RootDir / "test_rowview_unsetcolumns.xml", RootDir / "expected" / "test_rowview_unsetcolumns.log");
@@ -38,3 +41,5 @@ BOOST_AUTO_TEST_CASE( test_rowview_columns )
executeRowViewTest(RootDir / "test_rowview_columns.xml", RootDir / "expected" / "test_rowview_columns.log");
}
+BOOST_AUTO_TEST_SUITE_END();
+