root / gnuradio-core / src / tests / test_general.cc @ 3d8074ac
History | View | Annotate | Download (1.3 kB)
| 1 | 5d69a524 | jcorgan | /* -*- c++ -*- */
|
|---|---|---|---|
| 2 | 5d69a524 | jcorgan | /*
|
| 3 | ebb0f56d | Tom Rondeau | * Copyright 2002,2010,2011 Free Software Foundation, Inc. |
| 4 | f919f9dc | Tom Rondeau | * |
| 5 | 5d69a524 | jcorgan | * This file is part of GNU Radio |
| 6 | f919f9dc | Tom Rondeau | * |
| 7 | 5d69a524 | jcorgan | * GNU Radio is free software; you can redistribute it and/or modify |
| 8 | 5d69a524 | jcorgan | * it under the terms of the GNU General Public License as published by |
| 9 | 937b719d | eb | * the Free Software Foundation; either version 3, or (at your option) |
| 10 | 5d69a524 | jcorgan | * any later version. |
| 11 | f919f9dc | Tom Rondeau | * |
| 12 | 5d69a524 | jcorgan | * GNU Radio is distributed in the hope that it will be useful, |
| 13 | 5d69a524 | jcorgan | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | 5d69a524 | jcorgan | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | 5d69a524 | jcorgan | * GNU General Public License for more details. |
| 16 | f919f9dc | Tom Rondeau | * |
| 17 | 5d69a524 | jcorgan | * You should have received a copy of the GNU General Public License |
| 18 | 5d69a524 | jcorgan | * along with GNU Radio; see the file COPYING. If not, write to |
| 19 | 86f5c924 | eb | * the Free Software Foundation, Inc., 51 Franklin Street, |
| 20 | 86f5c924 | eb | * Boston, MA 02110-1301, USA. |
| 21 | 5d69a524 | jcorgan | */ |
| 22 | 5d69a524 | jcorgan | |
| 23 | 5d69a524 | jcorgan | #include <cppunit/TextTestRunner.h> |
| 24 | 036a42c0 | Tom Rondeau | #include <cppunit/XmlOutputter.h> |
| 25 | 2b8bd0d2 | Tom Rondeau | |
| 26 | 2b8bd0d2 | Tom Rondeau | #include <gr_unittests.h> |
| 27 | 5d69a524 | jcorgan | #include <qa_general.h> |
| 28 | 5d69a524 | jcorgan | |
| 29 | f919f9dc | Tom Rondeau | int
|
| 30 | 5d69a524 | jcorgan | main (int argc, char **argv) |
| 31 | 5d69a524 | jcorgan | {
|
| 32 | 2b8bd0d2 | Tom Rondeau | CppUnit::TextTestRunner runner; |
| 33 | 05cc02ce | Josh Blum | std::ofstream xmlfile(get_unittest_path("gnuradio_core_general.xml").c_str());
|
| 34 | 036a42c0 | Tom Rondeau | CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile);
|
| 35 | 5d69a524 | jcorgan | |
| 36 | 5d69a524 | jcorgan | runner.addTest (qa_general::suite ()); |
| 37 | 036a42c0 | Tom Rondeau | runner.setOutputter(xmlout); |
| 38 | f919f9dc | Tom Rondeau | |
| 39 | 5d69a524 | jcorgan | bool was_successful = runner.run ("", false); |
| 40 | 5d69a524 | jcorgan | |
| 41 | 5d69a524 | jcorgan | return was_successful ? 0 : 1; |
| 42 | 5d69a524 | jcorgan | } |