Instead of TEST_PROGS. This has two advantages:
* By deferring the builds until make check any prerequisites, especially
in test-core, are already built regardless of overall build order.
* The output of these tests is logged and the success or failure
included in the make check summary instead of adding their rather verbose
output to the stderr.
KvpFrame was implemented using GList. Given the current desire
to distance ourselves from glib and acquaint the project with
C++, the standard library thereof, and boost libraries, KvpFrame
has been replaced by an implementation that uses a std::map<
const char *, KvpValueImpl *>.
There were some cases of the KvpFrame's glist being accessed
directly. A new API to help callers access the KvpFrame's contents
systematically by providing a list of keys has been created, and
call sites of the GList code have been updated.
Another deprecated #define was found and removed (kvp_frame_set_str).
Enabled with --enable-google-test, configure the location of the sources
with --with-gtest-root, --with-gtest-headers, --with-gmock-root, and
--with-gmock-headers. The latter isn't necessary if the headers are
installed in /usr/include and the sources in /usr/src as the Debian
packages do.
This is a first-pass and needs to be made a bit more sophisticated later.
It might also be worthwhile to extract it into an m4 macro.
The '.scm' extension prevents loading of a precompiled
version of the file from the %load-compiled-path and
will always trigger an autocompilation instead. Omitting
the extension properly allows the function to load a
precompiled version if it exists and is more recent than
the source file. This is only relevant for guile 2 but
works ok for guile 1.8 as well so it's changed unconditionally.
The bare percent sign in this string messes with po translation
files and causes difficulties compiling without backslashes and
other pain. Cleans up the English by using real words.
kvp_frame should not be used by C code, but rather the standard
KvpFrame. The deprecated value just adds one more name for this
class that doesn't add any value.
The formatting code was removed with the introduction
of the zoom cursor. It continued to display
poorly formatted information though which is now fixed again
KvpValue is now instantiated as a boost::variant and passed around as an opaque
pointer in C. The C interface is basically unchanged and a c++ interface exists
in kvp-value.hpp
The c++ implementation for KvpValue is called KvpValueImpl and is in kvp-value.cpp.
We don't use structured exception handling at this point, so c++ functions are
marked 'noexcept'.
The logic is within the c++ implementations. C wrapper functions do little besides
ensure that the pointer is not nullptr before calling into c++.
The logic in kvp_value_glist_to_string was moved to the c++ class. It's an
implementation detail, but unfortunately, it was being exposed through a pointer,
so I had to modify the test just a bit to not use it directly.
In order to work around what seems to be a bug in an Apple compiler, it was decided
to create an header file private to kvp-value and kvp_frame that holds the definition
of KvpFrame so that it was visible to both translation units.