1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
From 8b04c5bb1ee4e6e2a2276b80086b7edec633d80f Mon Sep 17 00:00:00 2001
From: Balint Reczey <balint.reczey@canonical.com>
Date: Fri, 19 Jun 2020 21:50:42 +0200
Subject: [PATCH] unittests: compare bpaggregate() and aggregate() on the
identically ordered data
On ppc64el rounding errors made the reordered data's sum() differ
---
inst/unitTests/test_bpaggregate.R | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/inst/unitTests/test_bpaggregate.R
+++ b/inst/unitTests/test_bpaggregate.R
@@ -33,6 +33,7 @@ test_bpaggregate_formula <-
checkEquals(x1, x2)
iris1 <- iris1[sample(nrow(iris1)),]
- x3 <- bpaggregate(f, data = iris1, FUN = sum)
- checkEquals(x2, x3)
+ x3 <- aggregate(f, data=iris1, FUN=sum)
+ x4 <- bpaggregate(f, data = iris1, FUN = sum)
+ checkIdentical(x3, x4)
}
|