annotate data/model/test/svcore-data-model-test.cpp @ 1561:d3814e07b8aa

Debug bits
author Chris Cannam
date Thu, 01 Nov 2018 15:01:41 +0000
parents c5092ca1c6e5
children a090221caeda
rev   line source
Chris@1086 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@1086 2 /*
Chris@1086 3 Sonic Visualiser
Chris@1086 4 An audio file viewer and annotation editor.
Chris@1086 5 Centre for Digital Music, Queen Mary, University of London.
Chris@1086 6
Chris@1086 7 This program is free software; you can redistribute it and/or
Chris@1086 8 modify it under the terms of the GNU General Public License as
Chris@1086 9 published by the Free Software Foundation; either version 2 of the
Chris@1086 10 License, or (at your option) any later version. See the file
Chris@1086 11 COPYING included with this distribution for more information.
Chris@1086 12 */
Chris@1086 13
Chris@1086 14 #include "TestFFTModel.h"
Chris@1528 15 #include "TestZoomConstraints.h"
Chris@1537 16 #include "TestWaveformOversampler.h"
Chris@1086 17
Chris@1086 18 #include <QtTest>
Chris@1086 19
Chris@1086 20 #include <iostream>
Chris@1086 21
Chris@1086 22 using namespace std;
Chris@1086 23
Chris@1086 24 int main(int argc, char *argv[])
Chris@1086 25 {
Chris@1086 26 int good = 0, bad = 0;
Chris@1086 27
Chris@1086 28 QCoreApplication app(argc, argv);
Chris@1392 29 app.setOrganizationName("sonic-visualiser");
Chris@1086 30 app.setApplicationName("test-model");
Chris@1086 31
Chris@1086 32 {
Chris@1429 33 TestFFTModel t;
Chris@1429 34 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1429 35 else ++bad;
Chris@1086 36 }
Chris@1086 37
Chris@1528 38 {
Chris@1528 39 TestZoomConstraints t;
Chris@1528 40 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1528 41 else ++bad;
Chris@1528 42 }
Chris@1528 43
Chris@1537 44 {
Chris@1537 45 TestWaveformOversampler t;
Chris@1537 46 if (QTest::qExec(&t, argc, argv) == 0) ++good;
Chris@1537 47 else ++bad;
Chris@1537 48 }
Chris@1537 49
Chris@1086 50 if (bad > 0) {
Chris@1476 51 SVCERR << "\n********* " << bad << " test suite(s) failed!\n" << endl;
Chris@1429 52 return 1;
Chris@1086 53 } else {
Chris@1476 54 SVCERR << "All tests passed" << endl;
Chris@1429 55 return 0;
Chris@1086 56 }
Chris@1086 57 }
Chris@1086 58