diff options
author | Evgeny Mandrikov <Godin@users.noreply.github.com> | 2016-09-26 20:20:07 +0200 |
---|---|---|
committer | Marc R. Hoffmann <hoffmann@mountainminds.com> | 2016-09-26 20:20:07 +0200 |
commit | 9b1c6f5a0ead14e253e9809cce37edf7ea8bcafb (patch) | |
tree | 9b61130d42ebbd1e778c1edb4fcc3d7dada892e1 /org.jacoco.report.test | |
parent | 616b5fbe1de4b6aa67452635d3faaa1f4920a608 (diff) | |
download | jacoco-9b1c6f5a0ead14e253e9809cce37edf7ea8bcafb.tar.gz |
Use RoundingMode#FLOOR for percentages in HTML report (#452)
Diffstat (limited to 'org.jacoco.report.test')
-rw-r--r-- | org.jacoco.report.test/src/org/jacoco/report/internal/html/table/PercentageColumnTest.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/PercentageColumnTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/PercentageColumnTest.java index fb3cad09..6b472056 100644 --- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/PercentageColumnTest.java +++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/PercentageColumnTest.java @@ -98,6 +98,16 @@ public class PercentageColumnTest { } @Test + public void testRounding() throws Exception { + final ITableItem item = createItem(1, 199); + column.item(td, item, resources, root); + doc.close(); + final Document doc = support.parse(output.getFile("Test.html")); + assertEquals("99%", + support.findStr(doc, "/html/body/table/tr/td[1]/text()")); + } + + @Test public void testLocale() throws Exception { IColumnRenderer column = new PercentageColumn(CounterEntity.LINE, Locale.FRENCH); |