annotate base/test/svcore-base-test.cpp @ 1590:2f8ee436e858 bqaudiostream

Merge
author Chris Cannam
date Thu, 17 Jan 2019 17:30:09 +0000
parents f04038819c26
children a090221caeda
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@1407 17 #include "TestScaleTickIntervals.h"
Chris@1022 18 #include "TestStringBits.h"
Chris@1262 19 #include "TestOurRealTime.h"
Chris@1262 20 #include "TestVampRealTime.h"
Chris@1265 21 #include "TestColumnOp.h"
Chris@1573 22 #include "TestMovingMedian.h"
Chris@879 23
Chris@879 24 #include <QtTest>
Chris@879 25
Chris@879 26 #include <iostream>
Chris@879 27
Chris@879 28 int main(int argc, char *argv[])
Chris@879 29 {
Chris@879 30 int good = 0, bad = 0;
Chris@879 31
Chris@879 32 QCoreApplication app(argc, argv);
Chris@1392 33 app.setOrganizationName("sonic-visualiser");
Chris@879 34 app.setApplicationName("test-svcore-base");
Chris@879 35
Chris@879 36 {
Chris@1429 37 TestRangeMapper t;
Chris@1429 38 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 39 else ++bad;
Chris@879 40 }
Chris@892 41 {
Chris@1429 42 TestPitch t;
Chris@1429 43 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 44 else ++bad;
Chris@892 45 }
Chris@1012 46 {
Chris@1262 47 TestOurRealTime t;
Chris@1429 48 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 49 else ++bad;
Chris@1262 50 }
Chris@1262 51 {
Chris@1262 52 TestVampRealTime t;
Chris@1429 53 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 54 else ++bad;
Chris@1012 55 }
Chris@1022 56 {
Chris@1429 57 TestStringBits t;
Chris@1429 58 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 59 else ++bad;
Chris@1022 60 }
Chris@1265 61 {
Chris@1429 62 TestColumnOp t;
Chris@1429 63 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 64 else ++bad;
Chris@1265 65 }
Chris@1392 66 {
Chris@1429 67 TestLogRange t;
Chris@1429 68 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 69 else ++bad;
Chris@1392 70 }
Chris@1407 71 {
Chris@1429 72 TestScaleTickIntervals t;
Chris@1429 73 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 74 else ++bad;
Chris@1407 75 }
Chris@1573 76 {
Chris@1573 77 TestMovingMedian t;
Chris@1573 78 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1573 79 else ++bad;
Chris@1573 80 }
Chris@879 81
Chris@879 82 if (bad > 0) {
Chris@1428 83 SVCERR << "\n********* " << bad << " test suite(s) failed!\n" << endl;
Chris@1428 84 return 1;
Chris@879 85 } else {
Chris@1428 86 SVCERR << "All tests passed" << endl;
Chris@1428 87 return 0;
Chris@879 88 }
Chris@879 89 }