summaryrefslogtreecommitdiff
path: root/libs/ardour/test
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-09-05 21:03:50 +0200
committerRobin Gareus <robin@gareus.org>2019-09-05 21:03:50 +0200
commit772444d769f02550667e6974cc8467d913dda99e (patch)
treec244c128d92504364e015d81f376045f82a2276d /libs/ardour/test
parent531ab8015c35e5c819b3aac794c26f6d284a28b1 (diff)
Unit-test update: honor FadeInAutomation parameter-range
Since 3d15499cdacacbafa32c8f, libevoral enforces Parameter min/max range. Ardour::ParameterDescriptor sets FadeInAutomation range to 0..2. Hence all unit-test data needs to be in this range.
Diffstat (limited to 'libs/ardour/test')
-rw-r--r--libs/ardour/test/automation_list_property_test.cc14
-rw-r--r--libs/ardour/test/data/automation_list_property_test1.ref4
-rw-r--r--libs/ardour/test/data/automation_list_property_test2.ref12
-rw-r--r--libs/ardour/test/data/automation_list_property_test3.ref4
-rw-r--r--libs/ardour/test/data/automation_list_property_test4.ref8
5 files changed, 21 insertions, 21 deletions
diff --git a/libs/ardour/test/automation_list_property_test.cc b/libs/ardour/test/automation_list_property_test.cc
index 9ad5fb2ff6..41d56859fe 100644
--- a/libs/ardour/test/automation_list_property_test.cc
+++ b/libs/ardour/test/automation_list_property_test.cc
@@ -61,8 +61,8 @@ AutomationListPropertyTest::basicTest ()
/* No change since we just cleared them */
CPPUNIT_ASSERT_EQUAL (false, property.changed());
- property->add (1, 2, false, false);
- property->add (3, 4, false, false);
+ property->add (1, 0.5, false, false);
+ property->add (3, 2.0, false, false);
/* Now it has changed */
CPPUNIT_ASSERT_EQUAL (true, property.changed());
@@ -83,8 +83,8 @@ AutomationListPropertyTest::basicTest ()
/* Do some more */
property.clear_changes ();
CPPUNIT_ASSERT_EQUAL (false, property.changed());
- property->add (5, 6, false, false);
- property->add (7, 8, false, false);
+ property->add (5, 1.5, false, false);
+ property->add (7, 1.0, false, false);
CPPUNIT_ASSERT_EQUAL (true, property.changed());
delete foo;
foo = new XMLNode ("test");
@@ -137,13 +137,13 @@ AutomationListPropertyTest::undoTest ()
boost::shared_ptr<Fred> sheila (new Fred);
/* Add some data */
+ sheila->_jim->add (0, 1, false, false);
sheila->_jim->add (1, 2, false, false);
- sheila->_jim->add (3, 4, false, false);
/* Do a `command' */
sheila->clear_changes ();
- sheila->_jim->add (5, 6, false, false);
- sheila->_jim->add (7, 8, false, false);
+ sheila->_jim->add (2, 1, false, false);
+ sheila->_jim->add (3, 0, false, false);
StatefulDiffCommand sdc (sheila);
std::string test_data_filename = "automation_list_property_test3.ref";
diff --git a/libs/ardour/test/data/automation_list_property_test1.ref b/libs/ardour/test/data/automation_list_property_test1.ref
index 9dad38b454..d15e7e2947 100644
--- a/libs/ardour/test/data/automation_list_property_test1.ref
+++ b/libs/ardour/test/data/automation_list_property_test1.ref
@@ -6,8 +6,8 @@
</from>
<to>
<AutomationList automation-id="fadein" id="163" interpolation-style="Linear" state="Off">
- <events>1 2
-3 4
+ <events>1 0.5
+3 2
</events>
</AutomationList>
</to>
diff --git a/libs/ardour/test/data/automation_list_property_test2.ref b/libs/ardour/test/data/automation_list_property_test2.ref
index 358782ae17..89549f7428 100644
--- a/libs/ardour/test/data/automation_list_property_test2.ref
+++ b/libs/ardour/test/data/automation_list_property_test2.ref
@@ -3,17 +3,17 @@
<FadeIn>
<from>
<AutomationList automation-id="fadein" id="165" interpolation-style="Linear" state="Off">
- <events>1 2
-3 4
+ <events>1 0.5
+3 2
</events>
</AutomationList>
</from>
<to>
<AutomationList automation-id="fadein" id="163" interpolation-style="Linear" state="Off">
- <events>1 2
-3 4
-5 6
-7 8
+ <events>1 0.5
+3 2
+5 1.5
+7 1
</events>
</AutomationList>
</to>
diff --git a/libs/ardour/test/data/automation_list_property_test3.ref b/libs/ardour/test/data/automation_list_property_test3.ref
index 7f091bea26..b39c592f42 100644
--- a/libs/ardour/test/data/automation_list_property_test3.ref
+++ b/libs/ardour/test/data/automation_list_property_test3.ref
@@ -2,8 +2,8 @@
<State>
<FadeIn>
<AutomationList automation-id="fadein" id="167" interpolation-style="Linear" state="Off">
- <events>1 2
-3 4
+ <events>0 1
+1 2
</events>
</AutomationList>
</FadeIn>
diff --git a/libs/ardour/test/data/automation_list_property_test4.ref b/libs/ardour/test/data/automation_list_property_test4.ref
index f003bb646f..59ec993c08 100644
--- a/libs/ardour/test/data/automation_list_property_test4.ref
+++ b/libs/ardour/test/data/automation_list_property_test4.ref
@@ -2,10 +2,10 @@
<State>
<FadeIn>
<AutomationList automation-id="fadein" id="167" interpolation-style="Linear" state="Off">
- <events>1 2
-3 4
-5 6
-7 8
+ <events>0 1
+1 2
+2 1
+3 0
</events>
</AutomationList>
</FadeIn>