annotate base/test/svcore-base-test.cpp @ 1480:5ac102155409 plugin-path-config

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