From 7731f768a63c521f8654f30de7c263c7d97e2f79 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 5 Sep 2019 19:32:51 +0200 Subject: Strict Ctrl surface unit-test: check re-activate. --- libs/ardour/test/control_surfaces_test.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libs/ardour/test') diff --git a/libs/ardour/test/control_surfaces_test.cc b/libs/ardour/test/control_surfaces_test.cc index bccb929a5c..da47d20bf2 100644 --- a/libs/ardour/test/control_surfaces_test.cc +++ b/libs/ardour/test/control_surfaces_test.cc @@ -18,6 +18,7 @@ */ #include "control_surfaces_test.h" +#include "control_protocol/control_protocol.h" #include "ardour/control_protocol_manager.h" #include "ardour/session.h" @@ -44,7 +45,16 @@ ControlSurfacesTest::instantiateAndTeardownTest () continue; } #endif + std::cout << "ControlSurfacesTest: " << (*i)->name << "\n"; + if ((*i)->protocol && (*i)->protocol->active()) { + /* may already be active because of user preferences */ + m.deactivate (**i); + } + m.activate (**i); + m.activate (**i); // should be a NO-OP, prints a warning + m.deactivate (**i); + m.deactivate (**i); // should be a NO-OP } } -- cgit v1.2.3