# HG changeset patch # User Chris Cannam # Date 1380636959 -3600 # Node ID 469d234acb9e001fb827d1b125fdcf944fb3b8ea # Parent 87ad66aaed32ef1fdb30fde08c370da446e8a086 Test two-arg cut as well diff -r 87ad66aaed32 -r 469d234acb9e tests/TestWindow.cpp --- a/tests/TestWindow.cpp Mon Sep 30 16:50:38 2013 +0100 +++ b/tests/TestWindow.cpp Tue Oct 01 15:15:59 2013 +0100 @@ -51,6 +51,13 @@ Window w(type, N); w.cut(d); COMPARE_ARRAY(d, expected); + + double d0[N], d1[N]; + for (int i = 0; i < N; ++i) d0[i] = 0.5 + (1.0 / (N * 2)) * (i + 1); + w.cut(d0, d1); + for (int i = 0; i < N; ++i) { + BOOST_CHECK_SMALL(d1[i] - d0[i] * expected[i], 1e-4); + } } BOOST_AUTO_TEST_CASE(bartlett)