Skip to content

Commit 9f679bf

Browse files
committed
Fix test-tensorCreation for old style
1 parent 3734d10 commit 9f679bf

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

nCompiler/tests/testthat/tensorOps_tests/test-tensorCreation.R

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ test_that("data initialization working: nNumeric, nInteger, nLogical", {
4747
)
4848
ncc <- nCompile(nc)
4949
nc_obj <- ncc$new()
50-
expect_equivalent(nc_obj$nf1(), nc$public_methods$nf1())
50+
Robj <- nc$new()
51+
expect_equivalent(nc_obj$nf1(), Robj$nf1())
5152
expect_equivalent(
5253
nc_obj$nf2(1:4, 3:6, c(TRUE, TRUE, FALSE, TRUE)),
53-
nc$public_methods$nf2(1:4, 3:6, c(TRUE, TRUE, FALSE, TRUE))
54+
Robj$nf2(1:4, 3:6, c(TRUE, TRUE, FALSE, TRUE))
5455
)
55-
expect_equivalent(nc_obj$nf3(), nc$public_methods$nf3())
56+
expect_equivalent(nc_obj$nf3(), Robj$nf3())
5657
})
5758

5859
test_that("data initialization working: nMatrix", {
@@ -85,9 +86,10 @@ test_that("data initialization working: nMatrix", {
8586
)
8687
ncc <- nCompile(nc)
8788
nc_obj <- ncc$new()
88-
expect_equivalent(nc_obj$nf1(), nc$public_methods$nf1())
89-
expect_equivalent(nc_obj$nf2(), nc$public_methods$nf2())
90-
expect_equivalent(nc_obj$nf3(1:14), nc$public_methods$nf3(1:14))
89+
Robj <- nc$new()
90+
expect_equivalent(nc_obj$nf1(), Robj$nf1())
91+
expect_equivalent(nc_obj$nf2(), Robj$nf2())
92+
expect_equivalent(nc_obj$nf3(1:14), Robj$nf3(1:14))
9193
})
9294

9395
cat("A SET OF FAILING tensorCreation TESTS IS COMMENTED OUT.")

0 commit comments

Comments
 (0)