From eb84a81b485f90e61d25a838b90d8907bf695018 Mon Sep 17 00:00:00 2001 From: Marco Colombo Date: Wed, 7 Aug 2024 13:49:36 +0200 Subject: [PATCH] Increase coverage in calc_gSGC_feldspar.R. This brings coverage for this file from 98.33% to 98.89%. --- tests/testthat/test_calc_gSGC_feldspar.R | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/testthat/test_calc_gSGC_feldspar.R b/tests/testthat/test_calc_gSGC_feldspar.R index 7ff80113c..d0daa7ec3 100644 --- a/tests/testthat/test_calc_gSGC_feldspar.R +++ b/tests/testthat/test_calc_gSGC_feldspar.R @@ -27,6 +27,16 @@ test_that("test errors", { "\\[calc_gSGC_feldspar\\(\\)\\] 'gSGC.type' needs to be one of the accepted values" ) + ## incorrect number of columns + expect_error( + calc_gSGC_feldspar( + data = data.frame(a = 1, b = 1, c = 1, d = 1), + gSGC.type = "50LxTx", + plot = FALSE + ), + "Structure of 'data' does not fit the expectations" + ) + ##finally run with plot output #test on a generated random sample set.seed(1234)