add comments, fix some things. TODO: comment tests, finish computeWerDists, test it
[epclust.git] / epclust / tests / testthat / test.wavelets.R
index 5eb19c5..96f9db3 100644 (file)
@@ -1,3 +1,21 @@
-#TODO: test computeWerDists (reference result? Jairo?)
+context("wavelets discrete & continuous")
 
-#TODO: test sur curvesToCoefs! ref results ?
+test_that("curvesToContribs behave as expected",
+{
+       curvesToContribs(...)
+})
+
+test_that("computeWerDists output correct results",
+{
+       nbytes = 8
+       endian = "little"
+
+       # On two identical series
+       serie = rnorm(212, sd=5)
+       synchrones = cbind(serie, serie)
+       dists = computeWerDists(synchrones, nbytes,endian,verbose=TRUE,parll=FALSE)
+       expect_equal(dists, matrix(0.,nrow=2,ncol=2))
+
+       # On two constant series
+       # TODO:...
+})