test_that("deviance() works.", { fit <- SLOPE( abalone$x, abalone$y, path_length = 20, cd_type = "cyclical", tol = 1e-5 ) d <- deviance(fit) expect_equivalent( d, c( 8.2512522180544, 6.43490254124433, 5.60167853757812, 5.219865032679, 5.04272831742817, 4.51821321267152, 4.21418261219829, 4.09803799369626, 3.95321731283277, 3.8483932984877, 3.79813064441957, 3.77900571103343, 3.77172991525607, 3.76903270182433, 3.76790423539022, 3.76747621241396, 3.76731380829468, 3.76725332412259, 3.76722925022792 ), tolerance = 1e-2 ) })