From 0482835aa0dc002f8342d777a70097091dcd71a2 Mon Sep 17 00:00:00 2001 From: Will Cornwell Date: Tue, 19 Nov 2024 14:28:43 +1100 Subject: [PATCH] another test --- tests/testthat/test-field_diversity.R | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/testthat/test-field_diversity.R diff --git a/tests/testthat/test-field_diversity.R b/tests/testthat/test-field_diversity.R new file mode 100644 index 0000000..49bec34 --- /dev/null +++ b/tests/testthat/test-field_diversity.R @@ -0,0 +1,10 @@ +ausplot.pi.data <- ausplotsR::get_ausplots(my.Plot_IDs= + c("NTASTU0002"), veg.PI=TRUE)$veg.PI + +test_that('field_diversity works', { +field_diversity <- calculate_field_diversity(ausplot.pi.data) +expect_true( +field_diversity$field_diversity$species_richness== + length(na.omit(unique(ausplot.pi.data$standardised_name))) +) +})