From 512cd50874b060d50a14d28df88018ac144cf6d3 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 7 Jul 2020 12:36:56 +0200 Subject: Remove copyright headers, update TOXSWA_cwa test - The window column of the windows component of a TOXSWA_cwa object is not a factor any more, but a character vector. - testthat::expect_equal_to_reference is replaced by testthat::expect_known_output, so we can have git diff show what has changed --- tests/testthat/H_sw_R1_stream_events.rds | Bin 334 -> 0 bytes tests/testthat/H_sw_R1_stream_events.txt | 0 tests/testthat/H_sw_R1_stream_windows.rds | Bin 235 -> 0 bytes tests/testthat/H_sw_R1_stream_windows.txt | 0 tests/testthat/test_TOXSWA.R | 6 +++--- 5 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 tests/testthat/H_sw_R1_stream_events.rds create mode 100644 tests/testthat/H_sw_R1_stream_events.txt delete mode 100644 tests/testthat/H_sw_R1_stream_windows.rds create mode 100644 tests/testthat/H_sw_R1_stream_windows.txt (limited to 'tests') diff --git a/tests/testthat/H_sw_R1_stream_events.rds b/tests/testthat/H_sw_R1_stream_events.rds deleted file mode 100644 index ba6557b..0000000 Binary files a/tests/testthat/H_sw_R1_stream_events.rds and /dev/null differ diff --git a/tests/testthat/H_sw_R1_stream_events.txt b/tests/testthat/H_sw_R1_stream_events.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/testthat/H_sw_R1_stream_windows.rds b/tests/testthat/H_sw_R1_stream_windows.rds deleted file mode 100644 index 2531189..0000000 Binary files a/tests/testthat/H_sw_R1_stream_windows.rds and /dev/null differ diff --git a/tests/testthat/H_sw_R1_stream_windows.txt b/tests/testthat/H_sw_R1_stream_windows.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/testthat/test_TOXSWA.R b/tests/testthat/test_TOXSWA.R index de60d48..b011288 100644 --- a/tests/testthat/test_TOXSWA.R +++ b/tests/testthat/test_TOXSWA.R @@ -1,4 +1,3 @@ -library(pfm) context("Read and analyse TOXSWA cwa files") # zipfile_test = tempfile() @@ -61,9 +60,10 @@ test_that("A TOXSWA 5.5.3 out file is correctly read and printed", { test_that("Getting events and moving window analysis works", { # Event analysis with two different thresholds H_sw_R1_stream$get_events(c(2, 10)) - expect_equal_to_reference(H_sw_R1_stream$events, file = "H_sw_R1_stream_events.rds") + expect_known_output(H_sw_R1_stream$events, file = "H_sw_R1_stream_events.txt") # Moving window analysis H_sw_R1_stream$moving_windows(c(7, 21)) - expect_equal_to_reference(H_sw_R1_stream$windows, file = "H_sw_R1_stream_windows.rds") + H_sw_R1_stream$windows + expect_known_output(H_sw_R1_stream$windows, file = "H_sw_R1_stream_windows.txt") }) -- cgit v1.2.1