summaryrefslogtreecommitdiff
path: root/tests/cgalstlsanitytest.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-05-24 14:16:20 (GMT)
committerMarius Kintel <marius@kintel.net>2013-05-24 14:16:20 (GMT)
commit26046f6f0c4a774cbbb2af8ae7dc0e687963440c (patch)
tree38ff04fc460e8aa55134fb1ee6167fafb90a3423 /tests/cgalstlsanitytest.cc
parenteefcd6d0b271642d470cd55bc47d1579d943938e (diff)
parent95e399e06c6522f3fa67679808a1d52815368efa (diff)
Merge branch 'master' into epec-kernel
Diffstat (limited to 'tests/cgalstlsanitytest.cc')
-rw-r--r--tests/cgalstlsanitytest.cc23
1 files changed, 8 insertions, 15 deletions
diff --git a/tests/cgalstlsanitytest.cc b/tests/cgalstlsanitytest.cc
index 2815463..4be7767 100644
--- a/tests/cgalstlsanitytest.cc
+++ b/tests/cgalstlsanitytest.cc
@@ -29,7 +29,7 @@
#include "parsersettings.h"
#include "node.h"
#include "module.h"
-#include "context.h"
+#include "modcontext.h"
#include "value.h"
#include "export.h"
#include "builtin.h"
@@ -38,11 +38,6 @@
#include "CGALEvaluator.h"
#include "PolySetCGALEvaluator.h"
-#include <QCoreApplication>
-#include <QFile>
-#include <QDir>
-#include <QSet>
-#include <QTextStream>
#ifndef _MSC_VER
#include <getopt.h>
#endif
@@ -56,7 +51,6 @@ namespace fs = boost::filesystem;
std::string commandline_commands;
std::string currentdir;
-QString examplesdir;
using std::string;
@@ -83,19 +77,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 top_ctx;
+ top_ctx.registerBuiltin();
- AbstractModule *root_module;
- ModuleInstantiation root_inst;
+ FileModule *root_module;
+ ModuleInstantiation root_inst("group");
root_module = parsefile(filename);
if (!root_module) {
@@ -107,7 +100,7 @@ int main(int argc, char **argv)
}
AbstractNode::resetIndexCounter();
- AbstractNode *absolute_root_node = root_module->evaluate(&root_ctx, &root_inst);
+ AbstractNode *absolute_root_node = root_module->instantiate(&top_ctx, &root_inst);
AbstractNode *root_node;
// Do we have an explicit root node (! modifier)?
if (!(root_node = find_root_tag(absolute_root_node))) root_node = absolute_root_node;
contact: Jan Huwald // Impressum