Skip to content

Commit

Permalink
testing fanout (#109)
Browse files Browse the repository at this point in the history
* testing fanout
* typo
  • Loading branch information
nfultz committed Feb 9, 2018
1 parent a3c0f24 commit ebe91a7
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/testthat/test-fanout.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
context("Fanout execution")

test_that("Fanout does something",{

N = 100

pop <- declare_population(N=N)

pop2 <- declare_population(noise=rnorm(N))

estimand <- declare_estimand(foo=mean(noise))

D <- declare_design(pop, pop2, estimand)

fan_strategy <- data.frame(end=2:3, n=c(1,100))


out <- DeclareDesign:::fan_out(D, fan_strategy)

estimands_out <- do.call(rbind, lapply(out, `[[`, "estimands_df"))

expect_equal( nrow(unique(estimands_out)), 1)

})

0 comments on commit ebe91a7

Please sign in to comment.