summaryrefslogtreecommitdiff
path: root/tests/csgtestcore.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/csgtestcore.cc')
-rw-r--r--tests/csgtestcore.cc17
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/csgtestcore.cc b/tests/csgtestcore.cc
index 7583a41..6da6411 100644
--- a/tests/csgtestcore.cc
+++ b/tests/csgtestcore.cc
@@ -6,7 +6,7 @@
#include "openscad.h"
#include "parsersettings.h"
#include "builtin.h"
-#include "context.h"
+#include "modcontext.h"
#include "node.h"
#include "module.h"
#include "polyset.h"
@@ -23,9 +23,6 @@
#include "csgtermnormalizer.h"
#include "OffscreenView.h"
-#include <QCoreApplication>
-#include <QTimer>
-
#include <sstream>
#include <vector>
@@ -128,20 +125,18 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type)
Builtins::instance()->initialize();
- QCoreApplication app(argc, argv);
-
fs::path original_path = fs::current_path();
std::string currentdir = boosty::stringy( fs::current_path() );
- parser_init(QCoreApplication::instance()->applicationDirPath().toStdString());
- add_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries"));
+ parser_init(boosty::stringy(fs::path(argv[0]).branch_path()));
+ add_librarydir(boosty::stringy(fs::path(argv[0]).branch_path() / "../libraries"));
- Context root_ctx;
- register_builtin(root_ctx);
+ ModuleContext root_ctx;
+ root_ctx.registerBuiltin();
AbstractModule *root_module;
- ModuleInstantiation root_inst;
+ ModuleInstantiation root_inst("group");
if (sysinfo_dump)
root_module = parse("sphere();","",false);
contact: Jan Huwald // Impressum