Skip to content

Commit

Permalink
Test case for PUB-532.
Browse files Browse the repository at this point in the history
  • Loading branch information
rpeck committed Jul 22, 2014
1 parent b3f53ac commit 9a20743
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions R/tests/testdir_jira/runit_NOPASS_pub_532_negative_exponent.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../findNSourceUtils.R')

test.runit_NOPASS_pub_532_negative_exponent <- function(localH2O) {

covtype.hex <- h2o.importFile(localH2O, normalizePath(locate("smalldata/covtype/covtype.20k.data")), "cov")

# Are we in the right universe?
expect_equal(20000, dim(covtype.hex)[1])
expect_equal(55, dim(covtype.hex)[2])

# currently works:
h2o.exec(covtype.hex$C55^2)
h2o.exec(covtype.hex$C55^(-2))

# currently fails:
h2o.exec(covtype.hex$C55^-2)
h2o.exec(covtype.hex$C55^ -2)
h2o.exec(covtype.hex$C55 ^-2)
h2o.exec(covtype.hex$C55 ^-2 )

testEnd()

}

doTest("PUB-532 expresison parser fails on negative exponents.", test.runit_NOPASS_pub_532_negative_exponent)

0 comments on commit 9a20743

Please sign in to comment.