comparison data/model/test/main.cpp @ 1086:9f4505ac9072

Tidy dense time-value model API a bit; add first simple unit test for FFT model
author Chris Cannam
date Wed, 10 Jun 2015 17:06:02 +0100
parents
children
comparison
equal deleted inserted replaced
1085:bf6f64dabe73 1086:9f4505ac9072
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 "TestFFTModel.h"
15
16 #include <QtTest>
17
18 #include <iostream>
19
20 using namespace std;
21
22 int main(int argc, char *argv[])
23 {
24 int good = 0, bad = 0;
25
26 QCoreApplication app(argc, argv);
27 app.setOrganizationName("Sonic Visualiser");
28 app.setApplicationName("test-model");
29
30 {
31 TestFFTModel t;
32 if (QTest::qExec(&t, argc, argv) == 0) ++good;
33 else ++bad;
34 }
35
36 if (bad > 0) {
37 cerr << "\n********* " << bad << " test suite(s) failed!\n" << endl;
38 return 1;
39 } else {
40 cerr << "All tests passed" << endl;
41 return 0;
42 }
43 }
44