summaryrefslogtreecommitdiff
path: root/libmm-glib/tests
Commit message (Collapse)AuthorAgeFilesLines
* libmm-glib,common-helpers: Add multiple apn-type managementFrederic Martinsons2023-02-171-0/+27
| | | | | | Fixes #676 Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
* libmm-glib,tests: extend tests for common helpers (string conversion)Frederic Martinsons2023-02-171-0/+636
| | | | Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
* build: drop autotoolsAleksander Morgado2022-11-071-32/+0
|
* libmm-glib,common-helpers: don't assume new_from_unix_utc() always succeedsAleksander Morgado2022-10-051-1/+8
| | | | | | | | | | | The g_date_time_new_from_unix_utc() method in glib2 may fail if the given timestamp is too far into the future. The value is supposed to be seconds since unix time origin, but internally it will be converted into usecs, so any value longer than G_MAXINT64 / USEC_PER_SECOND isn't allowed. This is currently used in the CLI, and we're anyway ignoring the error returned in that case, but at least it won't crash if it ever happens.
* sms: prevent crash if date is out of rangeCarlo Lobrano2022-04-081-2/+24
| | | | | | | | | | | | | g_date_time_new, and g_date_time_new_utc return NULL if inputs are out of range, and currently mm_new_iso8601_time passes the GDateTime created by those two functions to date_time_format_iso8601 without checking for NULL values, causing a g_date_time_format_iso8601 crash if PDU data is corrupted with wrong date. To prevent this, mm_new_iso8601_time now can return NULL and set a new GError if GDateTime created by g_date_time_new is NULL. Fixes #546
* cli, plugins: factorize usage of iso8601 datetime formatFrederic Martinsons2021-10-221-0/+19
| | | | | | Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com> Includes updates by Aleksander Morgado to fix coding style issues.
* build: Port to mesonIñigo Martínez2021-09-071-0/+21
| | | | | | meson is a build system focused on speed an ease of use, which helps speeding up the software development. This patch adds meson support along autotools.
* libmm-glib,tests: include string.h explicitlyAleksander Morgado2021-03-011-0/+1
| | | | For strlen()
* libmm-glib,tests: add ishexstr/hexstr2bin/bin2hexstr unit testsAleksander Morgado2021-02-231-0/+104
|
* libmm-glib,helpers: allow \r\n in string to number conversionsAleksander Morgado2020-01-311-0/+15
| | | | | | | | It's not uncommon that we may want to parse a simple AT response that contains a single number by doing mm_strip_tag() followed by mm_get_uint_from_str(). In order to do this, we need to have the helper methods that convert strings to numbers support \r\n characters at the end of the string, as we would have in AT responses.
* libmm-glib,test: avoid using deprecated mm_pco_list_free()Aleksander Morgado2020-01-311-1/+1
| | | | | | | | | | | | test-pco.c: In function ‘test_pco_list_add’: test-pco.c:82:5: warning: ‘mm_pco_list_free’ is deprecated [-Wdeprecated-declarations] 82 | mm_pco_list_free (list); | ^~~~~~~~~~~~~~~~ In file included from ../../libmm-glib/libmm-glib.h:82, from test-pco.c:17: ../../libmm-glib/mm-pco.h:67:6: note: declared here 67 | void mm_pco_list_free (GList *pco_list); | ^~~~~~~~~~~~~~~~
* tests: use memcmp() instead of g_assert_cmpmem() for nowBen Chan2018-11-081-2/+1
| | | | | | g_assert_cmpmem() isn't available until glib 2.46, while the minimum glib version required by ModemManager is 2.36. This patch replaces the uses of g_assert_cmpmem() with memcmp() instead.
* libmm-glib,pco: add helpers for managing a list of MMPcoBen Chan2018-08-182-8/+110
|
* glib: remove invocations of g_type_init()Ben Chan2017-02-031-1/+0
| | | | | | | | g_type_init() has been deprecated (and also marked with the attribute 'deprecated') since glib 2.36 as the type system is automatically initialized. Since the minimum version of glib required by ModemManager is 2.36, calling g_type_init() isn't necessarily in the ModemManager code.
* build: add code coverage supportJakub Sitnicki2015-01-111-0/+3
| | | | | | | | | | | | | | | | | | Build all targets, except for CLI tools (mmcli, uml290), with special flags needed for collecting code coverage information when the build has been configured with --enable-code-coverage. Three new targets are available in the top build directory: - `check-code-coverage' runs the test suite and generates a code coverage report, - `code-coverage-capture' generates a code coverage report from already collected data, which can come in handy when one wants to see code paths touched by a particular test, - `code-coverage-clean' removes the collected coverage data and the generated reports.
* build: setup gtester based testsAleksander Morgado2013-06-181-9/+3
|
* libmm-glib: don't install the common helpers headerAleksander Morgado2012-10-041-1/+2
| | | | And make it only available for internal ModemManager compilation.
* libmm-glib: remove the `libmm-common.h' headerAleksander Morgado2012-10-041-2/+2
| | | | | | | | | | | | | Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only. We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI' symbols, which if included before the `libmm-glib.h' library allow us to: * Don't include the libmm-glib high level API in the ModemManager daemon, as the object names would clash with those in the core. * Define some of the methods of helper objects to be included only if compiling ModemManager daemon or the mmcli.
* build: merge libmm-common into libmm-glibAleksander Morgado2012-10-042-0/+556
It's pointless to have libmm-common around, just merge it into libmm-glib and make ModemManager depend on libmm-glib directly. At the end, the non-common stuff in libmm-glib is really minimal.