annotate base/test/svcore-base-test.cpp @ 1613:ea4f3593c39c single-point

Fix compiler warning
author Chris Cannam
date Wed, 06 Mar 2019 16:37:10 +0000
parents 23a29e5dc0e9
children 24dc8cb42755
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@1612 23 #include "TestPointSeries.h"
Chris@879 24
Chris@1601 25 #include "system/Init.h"
Chris@1601 26
Chris@879 27 #include <QtTest>
Chris@879 28
Chris@879 29 #include <iostream>
Chris@879 30
Chris@879 31 int main(int argc, char *argv[])
Chris@879 32 {
Chris@879 33 int good = 0, bad = 0;
Chris@879 34
Chris@1601 35 // This is necessary to ensure correct behaviour of snprintf with
Chris@1601 36 // older MinGW implementations
Chris@1601 37 svSystemSpecificInitialisation();
Chris@1601 38
Chris@879 39 QCoreApplication app(argc, argv);
Chris@1392 40 app.setOrganizationName("sonic-visualiser");
Chris@879 41 app.setApplicationName("test-svcore-base");
Chris@879 42
Chris@879 43 {
Chris@1429 44 TestRangeMapper t;
Chris@1429 45 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 46 else ++bad;
Chris@879 47 }
Chris@892 48 {
Chris@1429 49 TestPitch t;
Chris@1429 50 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 51 else ++bad;
Chris@892 52 }
Chris@1012 53 {
Chris@1262 54 TestOurRealTime t;
Chris@1429 55 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 56 else ++bad;
Chris@1262 57 }
Chris@1262 58 {
Chris@1262 59 TestVampRealTime t;
Chris@1429 60 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 61 else ++bad;
Chris@1012 62 }
Chris@1022 63 {
Chris@1429 64 TestStringBits t;
Chris@1429 65 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 66 else ++bad;
Chris@1022 67 }
Chris@1265 68 {
Chris@1429 69 TestColumnOp t;
Chris@1429 70 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 71 else ++bad;
Chris@1265 72 }
Chris@1392 73 {
Chris@1429 74 TestLogRange t;
Chris@1429 75 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 76 else ++bad;
Chris@1392 77 }
Chris@1407 78 {
Chris@1429 79 TestScaleTickIntervals t;
Chris@1429 80 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 81 else ++bad;
Chris@1407 82 }
Chris@1573 83 {
Chris@1573 84 TestMovingMedian t;
Chris@1573 85 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1573 86 else ++bad;
Chris@1573 87 }
Chris@1612 88 {
Chris@1612 89 TestPointSeries t;
Chris@1612 90 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1612 91 else ++bad;
Chris@1612 92 }
Chris@879 93
Chris@879 94 if (bad > 0) {
Chris@1428 95 SVCERR << "\n********* " << bad << " test suite(s) failed!\n" << endl;
Chris@1428 96 return 1;
Chris@879 97 } else {
Chris@1428 98 SVCERR << "All tests passed" << endl;
Chris@1428 99 return 0;
Chris@879 100 }
Chris@879 101 }