Skip to content

Commit

Permalink
characterization test specific to GoF stats
Browse files Browse the repository at this point in the history
  • Loading branch information
dblodgett-usgs committed Apr 20, 2017
1 parent fb9ab2c commit 3ca5adf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Binary file added tests/testthat/data/test_calculate_GoF_stats.rds
Binary file not shown.
14 changes: 14 additions & 0 deletions tests/testthat/test_calculate_GoF_stats.R
@@ -0,0 +1,14 @@
context("calculate_GoF_stats")
library(EflowStats)

test_that("test example returns the same", {
Gaged <- obs_data
Gaged$date <- as.Date(Gaged$date)
Gaged <- dataCheck(Gaged, yearType = "water")
Modeled<-mod_data
Modeled$date <- as.Date(Modeled$date)
Modeled <- dataCheck(Modeled, yearType = "water")
GoFstats <- calculate_GoF_stats(Modeled,Gaged)
Gofstats_check <- readRDS("data/test_calculate_GoF_stats.rds")
expect_equal(GoFstats, Gofstats_check)
})

0 comments on commit 3ca5adf

Please sign in to comment.