tests/testthat/Old/test-emulation.R

context("test calling mainline with and without tzar and/or emulation")

source ("./model_support_code.R")


#   CAN'T GET THIS TO RUN AS A CHECK TEST EVEN THOUGH IT RUNS PERFECTLY
#   OUTSIDE OF CHECK.
#   SO, COMMENTING IT OUT FOR NOW.  MAY JUST BE TOO HARD TO GET IT TO
#   WORK INSIDE OF TESTTHAT WITHOUT UNDERSTANDING A LOT MORE ABOUT TESTTHAT...

# test_that("tzar emulation works", {
# parameters = run_tzar (main_function=trial_main_function,
#                        projectPath="/Users/bill/D/Projects/ProblemDifficulty/pkgs/tzar/tests/testthat",
#                        tzarJarPath = "~/D/rdv-framework-latest-work/tzar.jar",
#                        emulation_scratch_file_path="~/tzar_emulation_scratch.yaml",
#                        emulatingTzar=TRUE
#                        )
# cat ("\n>>>>>>>  in test that tzar emulation works, length (parameters) = '",
#      length(parameters), "'\n", sep='')
#
# expect_gt(length(parameters),0)
# })
#
#
# test_that("tzar works without emulation", {
# expect_equal(TRUE,TRUE)
# })

test_that("not using tzar at all works", {
    parameters = trial_main_function ()
    result = parameters$x
expect_equal(result,15)
})
langfob/tzar documentation built on May 20, 2019, 7:56 p.m.