tests/testthat/test-deductive-codes.R

test_that("deductive codes are read and applied properly", {

  # devtools::load_all("C:/pC/git/R/rock");

  extdataPath <- system.file("extdata",
                             package="rock");

  sourceName <- "kristina-example-1.rock";

  parsedSource <-
    rock::parse_source(
      file = file.path(extdataPath, sourceName)
    );

  testthat::expect_equal(
    parsedSource$qdt$loss[10],
    1
  );

});

Try the rock package in your browser

Any scripts or data that you put into this service are public.

rock documentation built on May 29, 2024, 11:30 a.m.