comparison base/test/svcore-base-test.cpp @ 1260:24c0d4c5356e 3.0-integration

Rearrange svcore tests so they can all be built from the top level
author Chris Cannam
date Mon, 14 Nov 2016 17:53:16 +0000
parents base/test/main.cpp@eecf544bed92
children c4f873749ab5
comparison
equal deleted inserted replaced
1259:a4554bf41367 1260:24c0d4c5356e
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 /*
3 Sonic Visualiser
4 An audio file viewer and annotation editor.
5 Centre for Digital Music, Queen Mary, University of London.
6
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version. See the file
11 COPYING included with this distribution for more information.
12 */
13
14 #include "TestRangeMapper.h"
15 #include "TestPitch.h"
16 #include "TestRealTime.h"
17 #include "TestStringBits.h"
18
19 #include <QtTest>
20
21 #include <iostream>
22
23 int main(int argc, char *argv[])
24 {
25 int good = 0, bad = 0;
26
27 QCoreApplication app(argc, argv);
28 app.setOrganizationName("Sonic Visualiser");
29 app.setApplicationName("test-svcore-base");
30
31 {
32 TestRangeMapper t;
33 if (QTest::qExec(&t, argc, argv) == 0) ++good;
34 else ++bad;
35 }
36 {
37 TestPitch t;
38 if (QTest::qExec(&t, argc, argv) == 0) ++good;
39 else ++bad;
40 }
41 {
42 TestRealTime t;
43 if (QTest::qExec(&t, argc, argv) == 0) ++good;
44 else ++bad;
45 }
46 {
47 TestStringBits t;
48 if (QTest::qExec(&t, argc, argv) == 0) ++good;
49 else ++bad;
50 }
51
52 if (bad > 0) {
53 cerr << "\n********* " << bad << " test suite(s) failed!\n" << endl;
54 return 1;
55 } else {
56 cerr << "All tests passed" << endl;
57 return 0;
58 }
59 }