Also, consistently use 'ch' for channel variables. This matches how we
consistently use sdi, devc, and so on all over the code-base.
This fixes parts of bug #259.
The GError object has to initialized to NULL before being passed to
g_file_set_contents or it will throw the following critical warning
GLib-CRITICAL **: g_file_set_contents: assertion 'error == NULL || *error == NULL' failed
and return FALSE, which leads to failed assertion and subsequently
to the test failing
This adds a suite of unit tests for libsigrok. It uses the 'Check'
tool/library (apt-get install check) to run the tests.
The configure tool tries to find libcheck. If it succeeds, a
"make check" will run all tests. Otherwise, none of the tests will
be built and "make check" will not run any tests.
This also means that users who don't have 'check' installed will still
be able to build and install libsigrok just fine.