@@ -48,14 +48,14 @@ test_that("matrix multiplication matches R for common shapes", {
4848 mat_3x4 <- matrix (rnorm(3 * 4 ), nrow = 3 )
4949 vec_4 <- rnorm(4 )
5050
51- expect_quick_identical (mat_mat , list (mat_A = mat_A , mat_B = mat_B ))
52- expect_quick_identical (
51+ expect_quick_equal (mat_mat , list (mat_A = mat_A , mat_B = mat_B ))
52+ expect_quick_equal (
5353 mat_mat_square ,
5454 list (mat_A = mat_sq_A , mat_B = mat_sq_B )
5555 )
56- expect_quick_identical (vec_mat , list (vec = vec_3 , mat_A = mat_3x4 ))
57- expect_quick_identical (mat_vec , list (mat_A = mat_3x4 , vec = vec_4 ))
58- expect_quick_identical (vec_vec , list (vec_A = vec_3 , vec_B = vec_3 ))
56+ expect_quick_equal (vec_mat , list (vec = vec_3 , mat_A = mat_3x4 ))
57+ expect_quick_equal (mat_vec , list (mat_A = mat_3x4 , vec = vec_4 ))
58+ expect_quick_equal (vec_vec , list (vec_A = vec_3 , vec_B = vec_3 ))
5959})
6060
6161test_that(" matrix multiplication handles transposed operands" , {
@@ -89,9 +89,9 @@ test_that("matrix multiplication handles transposed operands", {
8989 y_right <- matrix (rnorm(5 * 3 ), nrow = 5 )
9090 y_both <- matrix (rnorm(5 * 4 ), nrow = 5 )
9191
92- expect_quick_identical (matmul_t_left , list (x = x , y = y_left ))
93- expect_quick_identical (matmul_t_right , list (x = x , y = y_right ))
94- expect_quick_identical (matmul_t_both , list (x = x , y = y_both ))
92+ expect_quick_equal (matmul_t_left , list (x = x , y = y_left ))
93+ expect_quick_equal (matmul_t_right , list (x = x , y = y_right ))
94+ expect_quick_equal (matmul_t_both , list (x = x , y = y_both ))
9595})
9696
9797test_that(" matrix multiplication handles chained mixes" , {
@@ -109,7 +109,7 @@ test_that("matrix multiplication handles chained mixes", {
109109 b <- matrix (rnorm(5 * 3 ), nrow = 5 )
110110 c <- matrix (rnorm(5 * 5 ), nrow = 5 )
111111
112- expect_quick_identical (chain_mix , list (a = a , b = b , c = c ))
112+ expect_quick_equal (chain_mix , list (a = a , b = b , c = c ))
113113})
114114
115115test_that(" matrix multiplication handles 1x1 and 1xN/Nx1 shapes" , {
@@ -212,8 +212,8 @@ test_that("crossprod and tcrossprod match R", {
212212 x <- matrix (rnorm(6 * 4 ), nrow = 6 )
213213 y <- matrix (rnorm(6 * 4 ), nrow = 6 )
214214
215- expect_quick_identical (cross_fun , list (x = x , y = y ))
216- expect_quick_identical (tcross_fun , list (x = x , y = y ))
215+ expect_quick_equal (cross_fun , list (x = x , y = y ))
216+ expect_quick_equal (tcross_fun , list (x = x , y = y ))
217217})
218218
219219test_that(" single-argument crossprod/tcrossprod match R" , {
@@ -241,10 +241,10 @@ test_that("single-argument crossprod/tcrossprod match R", {
241241 x <- matrix (rnorm(5 * 4 ), nrow = 5 )
242242 v <- rnorm(5 )
243243
244- expect_quick_identical (cross_single , list (x = x ))
245- expect_quick_identical (tcross_single , list (x = x ))
246- expect_quick_identical (cross_vec , list (x = v ))
247- expect_quick_identical (tcross_vec , list (x = v ))
244+ expect_quick_equal (cross_single , list (x = x ))
245+ expect_quick_equal (tcross_single , list (x = x ))
246+ expect_quick_equal (cross_vec , list (x = v ))
247+ expect_quick_equal (tcross_vec , list (x = v ))
248248})
249249
250250test_that(" outer supports multiplication and %o%" , {
@@ -276,9 +276,9 @@ test_that("outer supports multiplication and %o%", {
276276 x <- rnorm(3 )
277277 y <- rnorm(4 )
278278
279- expect_quick_identical (outer_default , list (x = x , y = y ))
280- expect_quick_identical (outer_mul , list (x = x , y = y ))
281- expect_quick_identical (outer_op , list (x = x , y = y ))
279+ expect_quick_equal (outer_default , list (x = x , y = y ))
280+ expect_quick_equal (outer_mul , list (x = x , y = y ))
281+ expect_quick_equal (outer_op , list (x = x , y = y ))
282282})
283283
284284test_that(" outer errors on unsupported FUN" , {
0 commit comments