@@ -14,8 +14,9 @@ test_that("Actiwatch csv is correctly read", {
1414})
1515test_that(" Actiwatch awd is correctly read" , {
1616 file = system.file(" testfiles/Actiwatch.AWD" , package = " GGIRread" )
17- D = readActiwatchCount(filename = file , timeformat = " %d-%b-%Y %H:%M:%S" ,
18- desiredtz = " Europe/Amsterdam" )
17+ expect_warning(D <- readActiwatchCount(filename = file , timeformat = " %d-%b-%Y %H:%M:%S" ,
18+ desiredtz = " Europe/Amsterdam" ),
19+ regexp = " Detected 1 column names but the data has 3 columns*" )
1920 expect_equal(D $ epochSize , 60 )
2021 expect_equal(format(D $ startTime ), " 2009-10-01 17:00:00" )
2122 expect_equal(nrow(D $ data ), 329 )
@@ -27,8 +28,9 @@ test_that("Actiwatch awd is correctly read", {
2728
2829test_that(" Actiwatch awd error correctly" , {
2930 file = system.file(" testfiles/Actiwatch.AWD" , package = " GGIRread" )
30- expect_error(readActiwatchCount(filename = file ,
31+ expect_error(expect_warning( readActiwatchCount(filename = file ,
3132 timeformat = " %d-%m-%Y %H:%M:%S" ),
33+ regexp = " Detected 1 column names but the data has 3 columns*" ),
3234 regexp = " Time format*" )
3335
3436 expect_error(readActiwatchCount(filename = " " ,
0 commit comments