test_that("percentage-point and percent change are distinguished", { ref <- stat_reference( -0.7, "unemployment-rate change", "Example", "2024-2025", "percentage points", "Official provider", transformation = list(operation = "percentage point change", inputs = c(11.1, 10.4), result = -0.7) ) clm <- stat_claim( -6.31, "unemployment-rate change", "Example", "2024-2025", "percent", "Official provider", transformation = list(operation = "percent change", inputs = c(11.1, 10.4), result = -6.31) ) x <- transformation_audit(ref, clm) expect_equal(x$score, 0) expect_true(x$critical) expect_equal(x$code, "TRANSFORMATION_OPERATION_MISMATCH") })