changeset 1416:9a8995785827 scale-ticks

Another test, that needs some more work
author Chris Cannam
date Thu, 04 May 2017 13:19:57 +0100
parents 12316a9bcc8f
children 359147a50853
files base/test/TestScaleTickIntervals.h
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/base/test/TestScaleTickIntervals.h	Thu May 04 10:46:38 2017 +0100
+++ b/base/test/TestScaleTickIntervals.h	Thu May 04 13:19:57 2017 +0100
@@ -454,6 +454,7 @@
     
     void linear_0_1_0()
     {
+        // senseless input
 	auto ticks = ScaleTickIntervals::linear({ 0, 1, 0 });
 	vector<ScaleTickIntervals::Tick> expected {
 	};
@@ -462,12 +463,22 @@
     
     void linear_0_1_m1()
     {
+        // senseless input
 	auto ticks = ScaleTickIntervals::linear({ 0, 1, -1 });
 	vector<ScaleTickIntervals::Tick> expected {
 	};
 	compareTicks(ticks.ticks, expected);
     }
 
+    void linear_0p465_778_10()
+    {
+        // a case that gave unsatisfactory results in real life
+        auto ticks = ScaleTickIntervals::linear({ 0.465, 778.08, 10 });
+        vector<ScaleTickIntervals::Tick> expected {
+        };
+        compareTicks(ticks.ticks, expected);
+    }
+    
     void log_1_10_2()
     {
         auto ticks = ScaleTickIntervals::logarithmic({ 1, 10, 2 });