Skip to content

Commit b986951

Browse files
committed
RCW unit tests updated.
1 parent 5aaa6e1 commit b986951

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tests/testthat/test-eq5d.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ test_that("Wrapper function gives correct answer", {
2424
expect_equal(eq5d(as.matrix(test.df), country="Canada", version="5L", type="VT"), c(0.949,0.362,0.39,0.524,0.431))
2525
expect_equal(eq5d(c(MO=1,SC=2,UA=3,PD=2,AD=1), type="CW", version="5L", country="Denmark"), 0.736)
2626
expect_equal(eq5d(c(MO=3,SC=3,UA=3,PD=3,AD=3), type="RCW", version="3L", country="Netherlands", method="EQ"), -0.312)
27+
expect_equal(eq5d(c(MO=3,SC=3,UA=3,PD=3,AD=3), type="RCW", version="3L", country="Germany"), -0.495)
2728
expect_equal(eq5d(12345, country="Indonesia", version="5L", type="VT"), 0.240)
2829
expect_equal(eq5d(33333, country="Slovenia", version="Y3L"), -0.691)
2930
expect_equal(eq5d(test.char, country="UK", version="3L", type="TTO"), c(0.329, -0.090, -0.127))

tests/testthat/test-eq5drcw.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,5 @@ test_that("EQ-5D-3L crosswalk throws error for incorrect parameters", {
4242
expect_error(eq5drcw(c(MD=1,SC=2,UA=3,PD=2,AD=1), "Germany"))
4343
expect_error(eq5drcw(c(MO=1,SC=1,UA=1,PD=1,AD=1), "Swaziland"))
4444
expect_error(eq5drcw(c(MO=6,SC=1,UA=1,PD=1,AD=1), "Netherlands"))
45-
})
45+
expect_error(eq5drcw(c(MO=1,SC=1,UA=1,PD=1,AD=1), "Netherlands", method="EuroQol"))
46+
})

0 commit comments

Comments
 (0)