summaryrefslogtreecommitdiff
path: root/tests/csgtexttest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/csgtexttest.cc')
-rw-r--r--tests/csgtexttest.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/csgtexttest.cc b/tests/csgtexttest.cc
index e050232..3e26814 100644
--- a/tests/csgtexttest.cc
+++ b/tests/csgtexttest.cc
@@ -31,13 +31,12 @@
#include "parsersettings.h"
#include "node.h"
#include "module.h"
-#include "context.h"
+#include "modcontext.h"
#include "value.h"
#include "export.h"
#include "builtin.h"
#include "Tree.h"
-#include <QCoreApplication>
#ifndef _MSC_VER
#include <getopt.h>
#endif
@@ -52,7 +51,6 @@ namespace fs = boost::filesystem;
std::string commandline_commands;
std::string currentdir;
-QString examplesdir;
void csgTree(CSGTextCache &cache, const AbstractNode &root)
{
@@ -75,19 +73,18 @@ int main(int argc, char **argv)
Builtins::instance()->initialize();
- QCoreApplication app(argc, argv);
fs::path original_path = fs::current_path();
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");
AbstractNode *root_node;
root_module = parsefile(filename);
contact: Jan Huwald // Impressum