File: 0001-unittests-compare-bpaggregate-and-aggregate-on-the-i.patch

package info (click to toggle)
r-bioc-biocparallel 1.40.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,768 kB
  • sloc: cpp: 139; sh: 14; makefile: 8
file content (23 lines) | stat: -rw-r--r-- 822 bytes parent folder | download | duplicates (2)
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)
 }