+#ifndef NDEBUG
+ size_t test_orig_us_size = _size;
+ size_t test_orig_them_size = other._size;
+ TimeType test_time = 0;
+ size_t test_us_count = 0;
+ size_t test_them_count = 0;
+ for (iterator i = begin(); i != end(); ++i) {
+ assert(Evoral::midi_event_is_valid((*i).buffer(), (*i).size()));
+ assert((*i).time() >= test_time);
+ test_time = (*i).time();
+ ++test_us_count;
+ }
+ test_time = 0;
+ for (const_iterator i = other.begin(); i != other.end(); ++i) {
+ assert(Evoral::midi_event_is_valid((*i).buffer(), (*i).size()));
+ assert((*i).time() >= test_time);
+ test_time = (*i).time();
+ ++test_them_count;
+ }
+#endif
+