# HG changeset patch # User Chris Cannam # Date 1745598500 -3600 # Fri Apr 25 17:28:20 2025 +0100 # Node ID a1fcb11aeb542de5e3feb718efcecea56596a6eb # Parent 60169b038e757d16e37b83592a86a1f328cae02c Fix tests diff --git a/test.sml b/test.sml --- a/test.sml +++ b/test.sml @@ -1354,7 +1354,8 @@ end val minus = String.implode [chr 0xe2, chr 0x88, chr 0x92] - + val figurespace = String.implode [chr 0xe2, chr 0x80, chr 0x87] + fun tests () = [ ("linear-0-1-10", fn () => @@ -1388,7 +1389,7 @@ ( 8.0, "8" ), ( 10.0, "10" ) ] ), - ("linear-10-0-5", + ("linear-10-0-5-neg", fn () => checkTicks (linear { minValue = 10.0, maxValue = 0.0, countHint = 5, @@ -1398,7 +1399,7 @@ ( 8.0, "8" ), ( 10.0, "10" ) ] ), - ("linear-10-0-5", + ("linear-10-0-5-never", fn () => checkTicks (linear { minValue = 10.0, maxValue = 0.0, countHint = 5, @@ -1408,17 +1409,17 @@ ( 8.0, "8" ), ( 10.0, "10" ) ] ), - ("linear-10-0-5", + ("linear-10-0-5-always", fn () => checkTicks (linear { minValue = 10.0, maxValue = 0.0, countHint = 5, signs = ScaleIntervalTypes.SIGNS_ALWAYS }) - [ ( 0.0, "0" ), ( 2.0, "+2" ), + [ ( 0.0, figurespace ^ "0" ), ( 2.0, "+2" ), ( 4.0, "+4" ), ( 6.0, "+6" ), ( 8.0, "+8" ), ( 10.0, "+10" ) ] ), - ("linear-~10-0-5", + ("linear-~10-0-5-neg", fn () => checkTicks (linear { minValue = ~10.0, maxValue = 0.0, countHint = 5, @@ -1428,7 +1429,7 @@ ( ~2.0, minus ^ "2" ), ( ~0.0, "0" ) ] ), - ("linear-~10-0-5", + ("linear-~10-0-5-never", fn () => checkTicks (linear { minValue = ~10.0, maxValue = 0.0, countHint = 5, @@ -1438,17 +1439,17 @@ ( ~2.0, "2" ), ( ~0.0, "0" ) ] ), - ("linear-~10-0-5", + ("linear-~10-0-5-always", fn () => checkTicks (linear { minValue = ~10.0, maxValue = 0.0, countHint = 5, signs = ScaleIntervalTypes.SIGNS_ALWAYS }) [ ( ~10.0, minus ^ "10" ), ( ~8.0, minus ^ "8" ), ( ~6.0, minus ^ "6" ), ( ~4.0, minus ^ "4" ), - ( ~2.0, minus ^ "2" ), ( ~0.0, "0" ) + ( ~2.0, minus ^ "2" ), ( ~0.0, figurespace ^ "0" ) ] ), - ("linear-0-~10-5", + ("linear-0-~10-5-neg", fn () => checkTicks (linear { minValue = 0.0, maxValue = ~10.0, countHint = 5,