From 34f01d22c475614d82dc31798af7d431ad0ff7ba Mon Sep 17 00:00:00 2001 From: Andreas Zwinkau Date: Fri, 16 Jan 2015 20:58:48 +0100 Subject: [PATCH] adapt test cases where current behavior is ok (though not perfect) --- tests/guessnumber.d.ref | 3 +-- tests/heronian.d.ref | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/guessnumber.d.ref b/tests/guessnumber.d.ref index 9ff51c1..071f7e4 100644 --- a/tests/guessnumber.d.ref +++ b/tests/guessnumber.d.ref @@ -3,8 +3,7 @@ import std.stdio, std.random, std.typecons, std.conv, std.string, std.range; void main() { immutable interval = tuple(1, 100); - writefln("Guess my target number that is between " - ~ "%d and %d (inclusive).\n", + writefln("Guess my target number that is between " ~ "%d and %d (inclusive).\n", interval[]); immutable target = uniform!"[]"(interval[]); foreach (immutable i; sequence!q{n}) diff --git a/tests/heronian.d.ref b/tests/heronian.d.ref index d9c6d46..14d84c9 100644 --- a/tests/heronian.d.ref +++ b/tests/heronian.d.ref @@ -39,9 +39,9 @@ void main() /*@safe*/ writefln("%3s %8d %3dx%dx%d", t[].hero, t[].only.sum, t[]); } - writefln("Primitive Heronian triangles with sides up to %d: %d", maxSide, - h.length); - "\nFirst ten when ordered by increasing area, then perimeter,then maximum sides:".writeln; + writefln("Primitive Heronian triangles with sides up to %d: %d", maxSide, h.length); + "\nFirst ten when ordered by increasing area, then perimeter,then maximum sides:" + .writeln; showTriangles(h.take(10)); "\nAll with area 210 subject to the previous ordering:".writeln; showTriangles(h.filter!(t => t[].hero == 210));