From 15830036cb3e0f1b095b562c4fb9215c7bc35edf Mon Sep 17 00:00:00 2001 From: hadley Date: Tue, 25 Feb 2014 17:10:54 -0600 Subject: [PATCH] Better equivalency test --- inst/tests/test-array.r | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inst/tests/test-array.r b/inst/tests/test-array.r index 55c90ca8..5ebf7312 100644 --- a/inst/tests/test-array.r +++ b/inst/tests/test-array.r @@ -133,12 +133,12 @@ test_that("single column data frames work when treated as an array", { test_that("aaply equivalent to apply with correct permutation", { a <- matrix(seq_len(400), ncol = 20) - expect_that(rowMeans(a), equals(aaply(a, 1, mean), check.attr = FALSE)) - expect_that(colMeans(a), equals(aaply(a, 2, mean), check.attr = FALSE)) + expect_equivalent(rowMeans(a), aaply(a, 1, mean)) + expect_equivalent(colMeans(a), aaply(a, 2, mean)) b <- structure(a, dimnames = amv_dimnames(a)) - expect_that(rowMeans(b), equals(aaply(b, 1, mean), check.attr = FALSE)) - expect_that(colMeans(b), equals(aaply(b, 2, mean), check.attr = FALSE)) + expect_equivalent(rowMeans(b), aaply(b, 1, mean)) + expect_equivalent(colMeans(b), aaply(b, 2, mean)) }) test_that("array reconstruction correct with missing cells", {