annotate base/test/svcore-base-test.cpp @ 1394:9ef1cc26024c

Add Range01 normalisation method to ColumnOp. This is the normalisation that is actually used in the Colour 3D Plot layer historically when column normalisation is enabled (not Max1 after all).
author Chris Cannam
date Tue, 28 Feb 2017 14:04:16 +0000
parents 667e369cfeab
children 25ed6dde2ce0
rev   line source
Chris@879 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@879 2 /*
Chris@879 3 Sonic Visualiser
Chris@879 4 An audio file viewer and annotation editor.
Chris@879 5 Centre for Digital Music, Queen Mary, University of London.
Chris@879 6
Chris@879 7 This program is free software; you can redistribute it and/or
Chris@879 8 modify it under the terms of the GNU General Public License as
Chris@879 9 published by the Free Software Foundation; either version 2 of the
Chris@879 10 License, or (at your option) any later version. See the file
Chris@879 11 COPYING included with this distribution for more information.
Chris@879 12 */
Chris@879 13
Chris@1392 14 #include "TestLogRange.h"
Chris@883 15 #include "TestRangeMapper.h"
Chris@892 16 #include "TestPitch.h"
Chris@1022 17 #include "TestStringBits.h"
Chris@1262 18 #include "TestOurRealTime.h"
Chris@1262 19 #include "TestVampRealTime.h"
Chris@1265 20 #include "TestColumnOp.h"
Chris@879 21
Chris@879 22 #include <QtTest>
Chris@879 23
Chris@879 24 #include <iostream>
Chris@879 25
Chris@879 26 int main(int argc, char *argv[])
Chris@879 27 {
Chris@879 28 int good = 0, bad = 0;
Chris@879 29
Chris@879 30 QCoreApplication app(argc, argv);
Chris@1392 31 app.setOrganizationName("sonic-visualiser");
Chris@879 32 app.setApplicationName("test-svcore-base");
Chris@879 33
Chris@879 34 {
Chris@883 35 TestRangeMapper t;
Chris@879 36 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@879 37 else ++bad;
Chris@879 38 }
Chris@892 39 {
Chris@892 40 TestPitch t;
Chris@892 41 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@892 42 else ++bad;
Chris@892 43 }
Chris@1012 44 {
Chris@1262 45 TestOurRealTime t;
Chris@1262 46 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1262 47 else ++bad;
Chris@1262 48 }
Chris@1262 49 {
Chris@1262 50 TestVampRealTime t;
Chris@1012 51 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1012 52 else ++bad;
Chris@1012 53 }
Chris@1022 54 {
Chris@1022 55 TestStringBits t;
Chris@1022 56 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1022 57 else ++bad;
Chris@1022 58 }
Chris@1265 59 {
Chris@1265 60 TestColumnOp t;
Chris@1265 61 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1265 62 else ++bad;
Chris@1265 63 }
Chris@1392 64 {
Chris@1392 65 TestLogRange t;
Chris@1392 66 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1392 67 else ++bad;
Chris@1392 68 }
Chris@879 69
Chris@879 70 if (bad > 0) {
Chris@879 71 cerr << "\n********* " << bad << " test suite(s) failed!\n" << endl;
Chris@879 72 return 1;
Chris@879 73 } else {
Chris@879 74 cerr << "All tests passed" << endl;
Chris@879 75 return 0;
Chris@879 76 }
Chris@879 77 }