summaryrefslogtreecommitdiff
path: root/tests/cgalpngtest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cgalpngtest.cc')
-rw-r--r--tests/cgalpngtest.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/cgalpngtest.cc b/tests/cgalpngtest.cc
index 52205fd..afc3128 100644
--- a/tests/cgalpngtest.cc
+++ b/tests/cgalpngtest.cc
@@ -30,7 +30,7 @@
#include "node.h"
#include "module.h"
#include "polyset.h"
-#include "context.h"
+#include "modcontext.h"
#include "value.h"
#include "export.h"
#include "builtin.h"
@@ -43,7 +43,6 @@
#include "cgal.h"
#include "OffscreenView.h"
-#include <QCoreApplication>
#ifndef _MSC_VER
#include <getopt.h>
#endif
@@ -57,7 +56,6 @@ namespace fs = boost::filesystem;
std::string commandline_commands;
std::string currentdir;
-QString examplesdir;
using std::string;
@@ -97,19 +95,18 @@ int main(int argc, char **argv)
#endif
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");
root_module = parsefile(filename);
if (!root_module) {
contact: Jan Huwald // Impressum