diff options
author | Hans Baier <hansfbaier@googlemail.com> | 2009-02-06 20:31:12 +0000 |
---|---|---|
committer | Hans Baier <hansfbaier@googlemail.com> | 2009-02-06 20:31:12 +0000 |
commit | cb745dbb9b12323d9feec5629afdcf5e132a0db1 (patch) | |
tree | f934844d845b83284f305d0201f47e15a8ae0539 /libs/evoral/test | |
parent | 3d594b460b1d0fdbc6799ded15201174d9a2c03c (diff) |
* Evoral: waf and unit test compile and run now
git-svn-id: svn://localhost/ardour2/branches/3.0@4493 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/evoral/test')
-rw-r--r-- | libs/evoral/test/sequence.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/libs/evoral/test/sequence.cpp b/libs/evoral/test/sequence.cpp index ffe4c639f8..6da8f07417 100644 --- a/libs/evoral/test/sequence.cpp +++ b/libs/evoral/test/sequence.cpp @@ -1,12 +1,40 @@ #include <evoral/Sequence.hpp> +#include <evoral/TypeMap.hpp> using namespace Evoral; +class DummyTypeMap : public TypeMap { +public: + virtual ~DummyTypeMap() {} + + virtual bool type_is_midi(uint32_t type) const {return true;} + + virtual uint8_t parameter_midi_type(const Parameter& param) const {return 0;} + + virtual uint32_t midi_event_type(uint8_t status) const {return 0;} + + virtual bool is_integer(const Evoral::Parameter& param) const {return true;} + + virtual Parameter new_parameter(uint32_t type, uint8_t channel, uint32_t id) const {return Parameter(type, channel, id);} + + virtual std::string to_symbol(const Parameter& param) const {return "foo";} +}; + +template<typename Time> +class MySequence : public Sequence<Time> { +public: + MySequence(DummyTypeMap&map, int size) : Sequence<Time>(map, size) {} + + boost::shared_ptr<Control> control_factory(const Parameter& param) {return boost::shared_ptr<Control>();} +}; + + int main() { Glib::thread_init(); + DummyTypeMap type_map; - Sequence s(100); + MySequence<double> s(type_map, 100); return 0; } |