Skip to content

Commit

Permalink
namespace tuneR in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
edwbaker committed Oct 28, 2018
1 parent 96e1aaa commit 071520c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/testthat/test-cutws.R
Expand Up @@ -3,13 +3,13 @@ context("cutws")
test_that("inputs are correct", {
expect_error(cutws("string", from=1, to=2), "cutws expects a Wave object")
expect_error(cutws(1, from=1, to=2), "cutws expects a Wave object")
expect_error(cutws(sine(1000, duration=10), from = 1, to ="2"), "In cutws both from and to must be integers")
expect_error(cutws(sine(1000, duration=10), from = "1", to =2), "In cutws both from and to must be integers")
expect_error(cutws(sine(1000, duration=10), from = 1, to =2.5), "In cutws both from and to must be integers")
expect_error(cutws(sine(1000, duration=10), from = 1.5, to =2), "In cutws both from and to must be integers")
expect_silent(cutws(sine(1000, duration=10), from = 1, to =2))
expect_error(cutws(tuneR::sine(1000, duration=10), from = 1, to ="2"), "In cutws both from and to must be integers")
expect_error(cutws(tuneR::sine(1000, duration=10), from = "1", to =2), "In cutws both from and to must be integers")
expect_error(cutws(tuneR::sine(1000, duration=10), from = 1, to =2.5), "In cutws both from and to must be integers")
expect_error(cutws(tuneR::sine(1000, duration=10), from = 1.5, to =2), "In cutws both from and to must be integers")
expect_silent(cutws(tuneR::sine(1000, duration=10), from = 1, to =2))
})

test_that("to must be greater than from", {
expect_error(cutws(sine(1000, duration=10), from=20, to = 1), "In cutws to must be greater than from")
expect_error(cutws(tuneR::sine(1000, duration=10), from=20, to = 1), "In cutws to must be greater than from")
})

0 comments on commit 071520c

Please sign in to comment.