class library: Reset has been renamed to OnError
[supercollider.git] / testsuite / supernova / server_synth_factory_test.cpp
blobc287085aa4cc294610a05ef33d14f9dc66edb0f6
1 #include <boost/test/unit_test.hpp>
3 #include "server/synth_factory.hpp"
5 #include "test_synth.hpp"
7 using namespace nova;
8 using namespace std;
10 namespace
12 struct test_synth_prototype:
13 public synth_prototype
15 test_synth_prototype():
16 synth_prototype(c_string("foo"))
19 abstract_synth * create_instance(int node_id)
21 return new test_synth(node_id, this);
26 BOOST_AUTO_TEST_CASE( synth_factory_test_1 )
28 rt_pool.init(1<<20);
30 synth_factory sf;
32 sf.register_prototype(new test_synth_prototype);
34 auto_ptr<abstract_synth> s(sf.create_instance("foo", 1));
36 BOOST_REQUIRE(s.get() != 0);