Commit Graph

132 Commits

Author SHA1 Message Date
Uwe Hermann 4ce6b5e7eb test/CMakeLists.txt: Fix file list, fix -DENABLE_TESTS=y build.
The build is now fixed for -DENABLE_TESTS=y, but re-enabling the
actual unit tests (and potentially other issues) will need more work.
2014-11-29 17:48:09 +01:00
Uwe Hermann 226a15274c Build system: Fix issue with unit tests, simplify code.
Drop some unneeded lines from test/CMakeLists.txt. Most of the variables
are inherited from the main CMakeLists.txt file. This reduces the amount
of duplicated code and the likelyhood that the two CMakeLists.txt files
get out of sync.

This fixes the following issues when building the unit tests
(related to mixing Qt4 and Qt5 apparently):

  [ 69%] Building CXX object CMakeFiles/pulseview.dir/signalhandler.cpp.o
  [...]/test/__/pv/moc_sigsession.cxx:13:2:
  error: #error "This file was generated using the moc from 4.8.6. It"
   #error "This file was generated using the moc from 4.8.6. It"
    ^
  [...]/test/__/pv/moc_sigsession.cxx:14:2:
  error: #error "cannot be used with the include files from this version of Qt."
   #error "cannot be used with the include files from this version of Qt."
    ^
  [...]/test/__/pv/moc_sigsession.cxx:15:2:
  error: #error "(The moc has changed too much.)"
   #error "(The moc has changed too much.)"
    ^
  [...]/test/__/pv/moc_sigsession.cxx:64:7:
  error: ‘QMetaObjectExtraData’ does not name a type
   const QMetaObjectExtraData pv::SigSession::staticMetaObjectExtraData = {
         ^
  [...]/test/__/pv/moc_sigsession.cxx:70:37:
  error: ‘staticMetaObjectExtraData’ was not declared in this scope
         qt_meta_data_pv__SigSession, &staticMetaObjectExtraData }
                                       ^
  [...]/test/__/pv/moc_sigsession.cxx:
  In member function ‘virtual const QMetaObject* pv::SigSession::metaObject() const’:
  [...]/test/__/pv/moc_sigsession.cxx:79:71:
  error: conditional expression between distinct pointer types
  ‘QDynamicMetaObjectData*’ and ‘const QMetaObject*’ lacks a cast
       return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
                                                                         ^
  [...]/test/__/pv/moc_sigsession.cxx:80:1:
  warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
  test/CMakeFiles/pulseview-test.dir/build.make:1362: recipe for target
  'test/CMakeFiles/pulseview-test.dir/__/pv/moc_sigsession.cxx.o' failed
  make[2]: ***
  [test/CMakeFiles/pulseview-test.dir/__/pv/moc_sigsession.cxx.o] Error 1
  CMakeFiles/Makefile2:110: recipe for target
  'test/CMakeFiles/pulseview-test.dir/all' failed
  make[1]: *** [test/CMakeFiles/pulseview-test.dir/all] Error 2
  make[1]: *** Waiting for unfinished jobs....
2014-11-29 17:48:08 +01:00
Uwe Hermann c17403e872 decoderstack.cpp: Fix incorrect #inludes. 2014-11-29 17:29:15 +01:00
Uwe Hermann 48ecc1fcd4 test: Disable all unit tests for now (all of them are broken). 2014-11-29 17:29:15 +01:00
Joel Holdsworth 2b81ae4682 Session: Renamed pv::SigSession to Session 2014-11-22 16:02:34 +00:00
Joel Holdsworth 2acdb232d6 Renamed C++ headers to .hpp 2014-11-22 14:32:09 +00:00
Joel Holdsworth 8dbbc7f0b9 Make member variable underscores a suffix instead of a prefix
This change is made because tokens prefixed with underscore are reserved.
2014-11-22 14:32:04 +00:00
Uwe Hermann 2a21747e9d Fix build on MinGW (boost thread related).
Now that PulseView uses boost thread again, bring back the required
settings to make it all work on MinGW (and with static builds).
2014-11-21 16:52:57 +01:00
Uwe Hermann 8f717aa7b1 test/CMakeLists.txt: Update file list. 2014-10-19 19:09:11 +02:00
Uwe Hermann 858ae630ae Fix the C++11 thread linking issues for unit tests as well. 2014-09-18 17:14:14 +02:00
Uwe Hermann 686a9bf7f6 test/CMakeLists.txt: Fix build. 2014-09-10 18:42:54 +02:00
Martin Ling 6ac6242b25 Rename 'probe' to 'channel' everywhere. 2014-08-29 21:33:59 +02:00
Jens Steinhauser 3fe44dc6ad Add missing files to test/CMakeLists.txt. 2014-06-11 15:48:56 +02:00
Uwe Hermann 496b72053b test/CMakeLists.txt: Drop obsolete boost-thread references. 2014-06-09 16:09:06 +02:00
Joel Holdsworth f9abf97e78 Replaced boost::shared_ptr with std::shared_ptr 2014-05-24 09:10:00 +01:00
Uwe Hermann ab186d22b2 Bump libsigrok/libsigrokdecode dependencies to 0.3.0 each. 2014-05-06 23:41:25 +02:00
Joel Holdsworth d0710d1efb Fixed test suite when ENABLE_DECODE=n 2014-03-27 10:58:08 +01:00
Joel Holdsworth a28c30252f Added decoder options binding for double values 2014-03-13 17:00:33 +00:00
Joel Holdsworth 182d2f5dbe Addded support for decoder options with a values list 2014-03-13 17:00:33 +00:00
Joel Holdsworth 03e8c9914e Use boost::filesystem::path to get the filename from a path 2014-03-01 11:15:02 +00:00
Joel Holdsworth ae2d1bc5b5 Moved session creation into DevInst objects 2014-03-01 11:02:11 +00:00
Joel Holdsworth 921b90c0b3 Added pv::device::Device 2014-03-01 11:02:11 +00:00
Joel Holdsworth 945745012e Moved DevInst into the pv::device namespace 2014-03-01 11:02:10 +00:00
Joel Holdsworth f646167f1b Fixed unit test CMakeLists.txt
Change-Id: Ib6f431ecc26e771ad18fb16118fe047eec8b734f
2014-02-14 17:31:51 +00:00
Uwe Hermann 7cfb538d04 CMakeLists.txt, test/CMakeLists.txt: MinGW linking fix. 2014-01-28 17:55:51 +01:00
Uwe Hermann a9a88468dc test/CMakeLists.txt: Fix MinGW build of the tests. 2014-01-28 17:54:30 +01:00
Joel Holdsworth 175d6573de Add an extra sample to the logic edges so that the end sample is visible 2014-01-25 12:54:10 +01:00
Joel Holdsworth 1c4a9ec178 Fixed AnalogSnapshotTest
This fixes bug #286
2014-01-25 12:54:10 +01:00
Uwe Hermann c0aa7d3136 test/CMakeLists.txt: Fix build on Windows/MinGW.
On Windows/MinGW we need to use Boost's 'thread_win32' instead of
'thread' (was already done in the main CMakeLists.txt, but not yet
in test/CMakeLists.txt).
2014-01-21 20:31:14 +01:00
Uwe Hermann 61e1e13ef2 CMakeLists.txt: Fix typos, cosmetics, consistency fixes. 2014-01-09 01:18:36 +01:00
Uwe Hermann 0aad432c15 CMakeLists.txt: Cosmetics, fix typos. 2014-01-01 15:03:18 +01:00
Joel Holdsworth dfb9f75d24 Removed duplicated __STDC_LIMIT_MACROS define 2013-12-30 16:15:00 +01:00
Joel Holdsworth 819f4c2539 Replaced using namespace with using class directives
This will fix ambiguity issues caused by the arrival of C++11
2013-12-30 16:15:00 +01:00
Joel Holdsworth 269528f55e Made decode an optional feature disabled by default. 2013-12-28 22:31:11 +01:00
Joel Holdsworth 06e810f29b Moved annotation painting code into DecodeTrace, and moved Annotation in pv::data::decode namespace. 2013-12-27 15:19:14 +00:00
Joel Holdsworth 204bae4548 Created DecoderGroupBox widget 2013-11-30 18:14:05 +00:00
Joel Holdsworth 0bce86095e Added Popup::closed signal 2013-11-30 18:14:05 +00:00
Joel Holdsworth 7491a29f33 Implemented decoder stacking 2013-11-30 18:12:58 +00:00
Joel Holdsworth 6e89374a67 Renamed pv::data::Decoder to DecoderStack 2013-11-30 18:12:58 +00:00
Joel Holdsworth f0d37dab05 Factored out DecoderMenu 2013-11-19 19:32:10 +00:00
Joel Holdsworth b93295580d Renamed DecodeSignal to DecodeTrace 2013-11-19 19:32:10 +00:00
Joel Holdsworth 4e5a440548 Moved decoder config into the popup 2013-11-19 19:32:10 +00:00
Uwe Hermann 2ec05cc6cd test/CMakeLists.txt: Fix Boost version requirement.
The current requirement is 1.42, the 1.46 in test/CMakeLists.txt is a
copy-paste error. This was noticed since OpenBSD currently ships 1.42
and the tests would not build there.
2013-10-30 10:43:47 +01:00
Joel Holdsworth b6b267bba9 Moved all srd commands into decode thread, implemented error messages
Ported decode tests to modified interface.
2013-10-24 00:12:27 +01:00
Joel Holdsworth 3045c869ad Modified Decode to only use LogicSignals 2013-10-24 00:12:24 +01:00
Bert Vermeulen 9b12bf0ee0 Make sure to use QT4 even if QT5 is available 2013-10-17 18:06:02 +02:00
Uwe Hermann d29f80caf2 tests/CMakeLists.txt: Add missing boost-thread check.
find_package(Boost ...) was missing the "thread" entry, which caused
linking to fail in some situations.

[100%] Building CXX object test/CMakeFiles/pulseview-test.dir/__/pv/widgets/moc_wellarray.cxx.o
Linking CXX executable pulseview-test
CMakeFiles/pulseview-test.dir/__/pv/sigsession.cpp.o: In function `pv::SigSession::SigSession(pv::DeviceManager&)':
sigsession.cpp:(.text+0xfa): undefined reference to `boost:🧵:thread()'
[....]
2013-10-16 17:39:33 +02:00
Uwe Hermann 6ab7877549 tests: Fix #include order.
<libsigrokdecode/libsigrokdecode.h> should be included first (as the
comment says), otherwise a warning can be the result (error in this
case due to -Werror usage):

[ 90%] Building CXX object test/CMakeFiles/pulseview-test.dir/data/decoder.cpp.o
In file included from /usr/include/python3.2mu/Python.h:8:0,
                 from [....]/include/libsigrokdecode/libsigrokdecode.h:25,
                 from [....]/test/data/decoder.cpp:23:
/usr/include/python3.2mu/pyconfig.h:1182:0: error: "_POSIX_C_SOURCE" redefined [-Werror]
 #define _POSIX_C_SOURCE 200112L
 ^
2013-10-16 17:37:09 +02:00
Joel Holdsworth 3b3a445c07 Added initial decoder unit test 2013-10-15 23:10:48 +01:00
Uwe Hermann 7ec01569fc Add missing libboost-system to test/CMakeLists.txt.
This fixes bug #133.

Thanks to Arkadiusz Miskiewicz <arekm@maven.pl> for the patch.
2013-07-15 16:01:01 +02:00
Joel Holdsworth 340bc0a429 Implemented Basic analog tests 2013-03-21 22:44:19 +00:00
Arkadiusz Miśkiewicz f64767a69b Added missing pthread linkage in tests 2013-03-11 20:41:35 +00:00
Uwe Hermann 9ba4ca3540 Minor whitespace fixes. 2013-03-03 17:20:00 +01:00
Joel Holdsworth c6013ca7dd Added Sixteen test case
This test case is a replica of sixteen.sr attached to the Bug #33
2013-01-13 19:24:31 +00:00
Joel Holdsworth 37fdce0ac5 Fixed LongPulses test packet setup
The length field is now populated with the number of bytes rather
than the number of samples
2013-01-13 13:42:50 +00:00
Alexandru Gagniuc 6092d96f5d tests: Add check for handling of wide data (16 probes)
The details of the test are explained in-source. This test is designed to
provide a test case for bug 33.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2013-01-08 14:18:37 -06:00
Joel Holdsworth 1b1ec77497 Moved data and snapshot classes into pv::data namespace 2012-12-24 15:26:08 +00:00
Uwe Hermann 333d5bbc0a Some smaller whitespace fixes. 2012-12-12 22:19:22 +01:00
Joel Holdsworth a322807e50 Moved unit test build commands into test/CMakeLists.txt 2012-10-21 15:56:46 +01:00
Joel Holdsworth fe48aaeba2 Removed uneeded statements in LogicDataSnapshot test 2012-10-20 18:29:25 +01:00
Joel Holdsworth 38f5609e63 Corrected more signed/unsigned inconsistencies in LogicDataSnapshot test 2012-10-20 18:29:25 +01:00
Joel Holdsworth 60b0c2daf2 Corrected signed/unsigned inconsistencies in LogicDataSnapshot 2012-10-20 18:29:24 +01:00
Alexandru Gagniuc fb746bcc3d Do not pass -DBOOST_TEST_DYN_LINK to pulseview
-DBOOST_TEST_DYN_LINK is meant to be passed only to pulseview-test,
not to pulseview. When test were enabled, this flag was defined
globally, and as a result, also passed to pulseview.

Create a CMakeLists.txt for test, and add test as a subdirectory
when tests are enabled. This way, -DBOOST_TEST_DYN_LINK is only
defined for our test app.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-10-13 15:02:59 +02:00
Joel Holdsworth cef18fc616 Made extdef.h a global include 2012-10-13 15:02:58 +02:00
Joel Holdsworth 51e77110d4 Moved all classes into the pv namespace 2012-10-12 22:41:01 +01:00
Joel Holdsworth b3f22de060 Corrected project name in header comments 2012-10-12 21:20:44 +01:00
Joel Holdsworth ac7aa63682 Added tests for low scale 2012-10-06 13:56:26 +01:00
Joel Holdsworth a126c277be Added LisMUsbHid test 2012-10-06 13:56:26 +01:00
Joel Holdsworth 4f767cf710 Made longpulses a 64-bit test 2012-10-06 13:56:26 +01:00
Joel Holdsworth ba3c4daeba Added missing delete to longpulses test 2012-10-06 13:56:26 +01:00
Joel Holdsworth 821f23af70 Added missing delete to pulses test 2012-10-06 13:56:26 +01:00
Joel Holdsworth 7d0d64f9c0 Fixes and optimizations to get_subsampled edges 2012-10-06 13:56:23 +01:00
Joel Holdsworth 910b16ec9f Added LongPulses test 2012-09-30 20:34:02 +01:00
Joel Holdsworth 3db297c4f9 Added Pulses test case for LogicDataSnapshot 2012-09-30 20:28:16 +01:00
Joel Holdsworth 39f6e56e9b Fixes to LargeData test checks 2012-09-30 20:27:59 +01:00
Joel Holdsworth b2bcbe51fe Added LogicDataSnapshot::get_subsample helper function 2012-09-16 11:23:08 +01:00
Joel Holdsworth 8743e7cba1 Added tests, and corrected behaviour of LogicDataSnapshot::pow2_ceil 2012-09-15 13:31:14 +01:00
Joel Holdsworth ecda6ca9b8 Added large data set tests for append_payload_to_mipmap 2012-09-03 14:00:03 +01:00
Joel Holdsworth 0b02e0578c Implemented O(log(N)) wave plotting 2012-09-03 14:00:03 +01:00
Joel Holdsworth 4ceab49abb Added subsampling for fast lookup 2012-09-03 14:00:02 +01:00
Joel Holdsworth 4780b4c82d Initial tests for LogicDataSnapshot 2012-09-03 14:00:02 +01:00
Joel Holdsworth f0fa92c6c4 Added empty unit testing framework 2012-09-03 13:59:56 +01:00