aboutsummaryrefslogtreecommitdiff
path: root/org.jacoco.report.test
diff options
context:
space:
mode:
authorEvgeny Mandrikov <Godin@users.noreply.github.com>2016-09-26 20:20:07 +0200
committerMarc R. Hoffmann <hoffmann@mountainminds.com>2016-09-26 20:20:07 +0200
commit9b1c6f5a0ead14e253e9809cce37edf7ea8bcafb (patch)
tree9b61130d42ebbd1e778c1edb4fcc3d7dada892e1 /org.jacoco.report.test
parent616b5fbe1de4b6aa67452635d3faaa1f4920a608 (diff)
downloadjacoco-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.java10
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);