diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2020-10-17 17:13:23 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2020-10-17 17:13:23 -0300 |
| commit | f2702a50a2b7e27ba46c44101edfc737f8eb54ac (patch) | |
| tree | f13f701f83299acc56d4fda0e4242d1cf56f24eb /clformat/src/test | |
| parent | 0a9fb6d243b891e2b56a5a73eb642e9ec8e81137 (diff) | |
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
Diffstat (limited to 'clformat/src/test')
| -rw-r--r-- | clformat/src/test/java/bjc/utils/test/ioutils/CLFormatterTest.java | 6 |
1 files changed, 6 insertions, 0 deletions
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 @@ -138,6 +138,12 @@ public class CLFormatterTest { } @Test + public void testFloatPrinting() { + assertFormat("1", "~`D", 1); + assertFormat("1.1", "~`D", 1.1); + } + + @Test public void testRandomCases() { // Random test cases assertEquals("3 dogs are here", format("~D dog~:[s are~; is~] here", 3, 3 == 1)); |
