annotate base/test/main.cpp @ 1188:d9698ee93659
spectrogram-minor-refactor
Extend column logic to peak frequency display as well, and correct some scopes according to whether values are per source column or per target pixel
author |
Chris Cannam |
date |
Mon, 20 Jun 2016 12:00:32 +0100 |
parents |
eecf544bed92 |
children |
|
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@883
|
14 #include "TestRangeMapper.h"
|
Chris@892
|
15 #include "TestPitch.h"
|
Chris@1012
|
16 #include "TestRealTime.h"
|
Chris@1022
|
17 #include "TestStringBits.h"
|
Chris@879
|
18
|
Chris@879
|
19 #include <QtTest>
|
Chris@879
|
20
|
Chris@879
|
21 #include <iostream>
|
Chris@879
|
22
|
Chris@879
|
23 int main(int argc, char *argv[])
|
Chris@879
|
24 {
|
Chris@879
|
25 int good = 0, bad = 0;
|
Chris@879
|
26
|
Chris@879
|
27 QCoreApplication app(argc, argv);
|
Chris@879
|
28 app.setOrganizationName("Sonic Visualiser");
|
Chris@879
|
29 app.setApplicationName("test-svcore-base");
|
Chris@879
|
30
|
Chris@879
|
31 {
|
Chris@883
|
32 TestRangeMapper t;
|
Chris@879
|
33 if (QTest::qExec(&t, argc, argv) == 0) ++good;
|
Chris@879
|
34 else ++bad;
|
Chris@879
|
35 }
|
Chris@892
|
36 {
|
Chris@892
|
37 TestPitch t;
|
Chris@892
|
38 if (QTest::qExec(&t, argc, argv) == 0) ++good;
|
Chris@892
|
39 else ++bad;
|
Chris@892
|
40 }
|
Chris@1012
|
41 {
|
Chris@1012
|
42 TestRealTime t;
|
Chris@1012
|
43 if (QTest::qExec(&t, argc, argv) == 0) ++good;
|
Chris@1012
|
44 else ++bad;
|
Chris@1012
|
45 }
|
Chris@1022
|
46 {
|
Chris@1022
|
47 TestStringBits t;
|
Chris@1022
|
48 if (QTest::qExec(&t, argc, argv) == 0) ++good;
|
Chris@1022
|
49 else ++bad;
|
Chris@1022
|
50 }
|
Chris@879
|
51
|
Chris@879
|
52 if (bad > 0) {
|
Chris@879
|
53 cerr << "\n********* " << bad << " test suite(s) failed!\n" << endl;
|
Chris@879
|
54 return 1;
|
Chris@879
|
55 } else {
|
Chris@879
|
56 cerr << "All tests passed" << endl;
|
Chris@879
|
57 return 0;
|
Chris@879
|
58 }
|
Chris@879
|
59 }
|