diff options
author | drd <drd@ableton.com> | 2017-02-16 17:28:54 +0100 |
---|---|---|
committer | drd <drd@ableton.com> | 2017-02-16 17:45:25 +0100 |
commit | e2f6b686003f86af8a64e7c6f7e8cf8c2da7ba69 (patch) | |
tree | a57fe24b425ad37b3ce5cf32aefec99cee7ede12 /tests/ingen_test.cpp | |
parent | e29b2efa89ccfab0c631dae771b8c0e5b9616839 (diff) | |
download | ingen-e2f6b686003f86af8a64e7c6f7e8cf8c2da7ba69.tar.gz ingen-e2f6b686003f86af8a64e7c6f7e8cf8c2da7ba69.tar.bz2 ingen-e2f6b686003f86af8a64e7c6f7e8cf8c2da7ba69.zip |
Preliminary alternative parallel traversal/benchmarking work
Diffstat (limited to 'tests/ingen_test.cpp')
-rw-r--r-- | tests/ingen_test.cpp | 74 |
1 files changed, 5 insertions, 69 deletions
diff --git a/tests/ingen_test.cpp b/tests/ingen_test.cpp index 1ac2e383..d55789db 100644 --- a/tests/ingen_test.cpp +++ b/tests/ingen_test.cpp @@ -51,78 +51,13 @@ #include "ingen/runtime_paths.hpp" #include "ingen/types.hpp" +#include "TestClient.hpp" + using namespace std; using namespace Ingen; World* world = NULL; -class TestClient : public Interface -{ -public: - explicit TestClient(Log& log) : _log(log) {} - ~TestClient() {} - - Raul::URI uri() const { return Raul::URI("ingen:testClient"); } - - void bundle_begin() {} - - void bundle_end() {} - - void put(const Raul::URI& uri, - const Properties& properties, - Resource::Graph ctx = Resource::Graph::DEFAULT) {} - - void delta(const Raul::URI& uri, - const Properties& remove, - const Properties& add) {} - - void copy(const Raul::URI& old_uri, - const Raul::URI& new_uri) {} - - void move(const Raul::Path& old_path, - const Raul::Path& new_path) {} - - void del(const Raul::URI& uri) {} - - void connect(const Raul::Path& tail, - const Raul::Path& head) {} - - void disconnect(const Raul::Path& tail, - const Raul::Path& head) {} - - void disconnect_all(const Raul::Path& parent_patch_path, - const Raul::Path& path) {} - - void set_property(const Raul::URI& subject, - const Raul::URI& predicate, - const Atom& value) {} - - void set_response_id(int32_t id) {} - - void get(const Raul::URI& uri) {} - - void undo() {} - - void redo() {} - - void response(int32_t id, Status status, const std::string& subject) { - if (status != Status::SUCCESS) { - _log.error(fmt("error on message %1%: %2% (%3%)\n") - % id % ingen_status_string(status) % subject); - exit(EXIT_FAILURE); - } - } - - void error(const std::string& msg) { - _log.error(fmt("error: %1%\n") % msg); - exit(EXIT_FAILURE); - } - -private: - Log& _log; -}; - - static void ingen_try(bool cond, const char* msg) { @@ -158,7 +93,8 @@ main(int argc, char** argv) // Create world try { - world = new World(argc, argv, NULL, NULL, NULL); + world = new World(NULL, NULL, NULL); + world->load_configuration(argc, argv); } catch (std::exception& e) { cout << "ingen: " << e.what() << endl; return EXIT_FAILURE; @@ -194,7 +130,7 @@ main(int argc, char** argv) world->engine()->init(48000.0, 4096, 4096); world->engine()->activate(); - // Load patch + // Load graph if (!world->parser()->parse_file(world, world->interface().get(), start_graph)) { cerr << "error: failed to load initial graph " << start_graph << endl; return EXIT_FAILURE; |