Mercurial > hg > svcore
comparison base/test/TestScaleTickIntervals.h @ 1421:8b7d6c1e1ab7
Adjust rounding; fixes tests on 32-bit Linux test box. Also update one test. Next: recheck everywhere else.
author | Chris Cannam |
---|---|
date | Thu, 20 Jul 2017 14:52:49 +0100 |
parents | e7cb4fb2aee4 |
children | 87ae75da6527 |
comparison
equal
deleted
inserted
replaced
1420:a533662c17f4 | 1421:8b7d6c1e1ab7 |
---|---|
335 void linear_pi_avogadro_7() | 335 void linear_pi_avogadro_7() |
336 { | 336 { |
337 auto ticks = ScaleTickIntervals::linear({ M_PI, 6.022140857e23, 7 }); | 337 auto ticks = ScaleTickIntervals::linear({ M_PI, 6.022140857e23, 7 }); |
338 ScaleTickIntervals::Ticks expected { | 338 ScaleTickIntervals::Ticks expected { |
339 // not perfect, but ok-ish | 339 // not perfect, but ok-ish |
340 { 1e+22, "1.00e+22" }, | 340 { 0, "0.0e+00" }, |
341 { 1e+23, "1.00e+23" }, | 341 { 9e+22, "9.0e+22" }, |
342 { 1.9e+23, "1.90e+23" }, | 342 { 1.8e+23, "1.8e+23" }, |
343 { 2.8e+23, "2.80e+23" }, | 343 { 2.7e+23, "2.7e+23" }, |
344 { 3.7e+23, "3.70e+23" }, | 344 { 3.6e+23, "3.6e+23" }, |
345 { 4.6e+23, "4.60e+23" }, | 345 { 4.5e+23, "4.5e+23" }, |
346 { 5.5e+23, "5.50e+23" }, | 346 { 5.4e+23, "5.4e+23" }, |
347 }; | 347 }; |
348 compareTicks(ticks, expected); | 348 compareTicks(ticks, expected); |
349 } | 349 } |
350 | 350 |
351 void linear_2_3_1() | 351 void linear_2_3_1() |