Skip to content

Commit 61b4e16

Browse files
test #ing
1 parent 7932412 commit 61b4e16

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

inst/tests/tests.Rraw

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21606,17 +21606,17 @@ test(2337.5, is.null(fwrite(data.table(a=numeric()), dec=",", sep=",")))
2160621606
# 2864 force decimal points for whole numbers in numeric columns
2160721607
dd = data.table(x=c(1, 2, 3))
2160821608
di = data.table(x=c(1L, 2L, 3L))
21609-
test(2337.1, capture.output(fwrite(dd, forceDecimal=TRUE)), c("x", "1.", "2.", "3."))
21610-
test(2337.2, capture.output(fwrite(dd, forceDecimal=TRUE, dec=",", sep="\t")), c("x", "1,", "2,", "3,"))
21611-
test(2337.3, capture.output(fwrite(dd, forceDecimal=FALSE)), c("x", "1", "2", "3"))
21612-
test(2337.4, capture.output(fwrite(di, forceDecimal=TRUE)), c("x", "1", "2", "3"))
21613-
test(2337.5, capture.output(fwrite(data.table(x=c(0.)), forceDecimal=TRUE)), c("x", "0."))
21614-
test(2337.6, capture.output(fwrite(data.table(x=c(-0.)), forceDecimal=TRUE)), c("x", "0."))
21615-
test(2337.7, capture.output(fwrite(data.table(x=c(0.00)), forceDecimal=TRUE)), c("x", "0."))
21609+
test(2338.1, capture.output(fwrite(dd, forceDecimal=TRUE)), c("x", "1.", "2.", "3."))
21610+
test(2338.2, capture.output(fwrite(dd, forceDecimal=TRUE, dec=",", sep="\t")), c("x", "1,", "2,", "3,"))
21611+
test(2338.3, capture.output(fwrite(dd, forceDecimal=FALSE)), c("x", "1", "2", "3"))
21612+
test(2338.4, capture.output(fwrite(di, forceDecimal=TRUE)), c("x", "1", "2", "3"))
21613+
test(2338.5, capture.output(fwrite(data.table(x=c(0.)), forceDecimal=TRUE)), c("x", "0."))
21614+
test(2338.6, capture.output(fwrite(data.table(x=c(-0.)), forceDecimal=TRUE)), c("x", "0."))
21615+
test(2338.7, capture.output(fwrite(data.table(x=c(0.00)), forceDecimal=TRUE)), c("x", "0."))
2161621616
# round trip
2161721617
local({
2161821618
f <- tempfile(); on.exit(unlink(f))
21619-
test(2337.8, {fwrite(dd, f, forceDecimal=TRUE); fread(f)}, dd)
21620-
test(2337.9, {fwrite(dd, f, forceDecimal=FALSE); fread(f)}, di)
21619+
test(2338.8, {fwrite(dd, f, forceDecimal=TRUE); fread(f)}, dd)
21620+
test(2338.9, {fwrite(dd, f, forceDecimal=FALSE); fread(f)}, di)
2162121621
})
2162221622

0 commit comments

Comments
 (0)