Skip to content

Commit

Permalink
Added unit test for sampling triangles
Browse files Browse the repository at this point in the history
  • Loading branch information
mages committed Jan 9, 2023
1 parent f2ea41d commit e872241
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions inst/unitTests/runit.BootChainLadder.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@ test.print.BootChainLadder <- function() {
res <- BootChainLadder(RAA)
checkEquals(res, print(res))
}

test.seed.BootChainLadder <- function() {
# Test that print(x) returns x; see ?print
B1 <- BootChainLadder(RAA, R = 10, seed = 123)
B2 <- BootChainLadder(RAA, R = 100, seed = 123)
checkEquals(B1$simClaims[,,1], B2$simClaims[,,1])
}

0 comments on commit e872241

Please sign in to comment.