From f2702a50a2b7e27ba46c44101edfc737f8eb54ac Mon Sep 17 00:00:00 2001 From: "Benjamin J. Culkin" Date: Sat, 17 Oct 2020 17:13:23 -0300 Subject: Implement float printing This implements a general directive for float printing (~`D). In the long term, instead of this directive, a more specific one (probably implemented by a macro or something) should be used --- clformat/src/test/java/bjc/utils/test/ioutils/CLFormatterTest.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clformat/src/test/java/bjc/utils') diff --git a/clformat/src/test/java/bjc/utils/test/ioutils/CLFormatterTest.java b/clformat/src/test/java/bjc/utils/test/ioutils/CLFormatterTest.java index 8cd3e61..888ddcf 100644 --- a/clformat/src/test/java/bjc/utils/test/ioutils/CLFormatterTest.java +++ b/clformat/src/test/java/bjc/utils/test/ioutils/CLFormatterTest.java @@ -137,6 +137,12 @@ public class CLFormatterTest { assertFormat("Abc Cad dAC", "~@(~A~)", "abc Cad dAC"); } + @Test + public void testFloatPrinting() { + assertFormat("1", "~`D", 1); + assertFormat("1.1", "~`D", 1.1); + } + @Test public void testRandomCases() { // Random test cases -- cgit v1.2.3