mirror of https://gerrit.osmocom.org/libosmocore
sms_test: Do not crash on logging.
This commit is contained in:
parent
1512ea6452
commit
e4c50d5a43
|
@ -31,6 +31,11 @@
|
|||
#include <osmocom/core/msgb.h>
|
||||
#include <osmocom/core/utils.h>
|
||||
|
||||
#include <osmocom/core/logging.h>
|
||||
#include <osmocom/core/application.h>
|
||||
|
||||
struct log_info fake_log_info = {};
|
||||
|
||||
struct test_case {
|
||||
const uint8_t *input;
|
||||
const uint16_t input_length;
|
||||
|
@ -278,6 +283,9 @@ int main(int argc, char** argv)
|
|||
int nchars;
|
||||
char result[256];
|
||||
|
||||
/* Fake logging. */
|
||||
osmo_init_logging(&fake_log_info);
|
||||
|
||||
/* test 7-bit encoding */
|
||||
for (i = 0; i < ARRAY_SIZE(test_encode); ++i) {
|
||||
/* Test legacy function (return value only) */
|
||||
|
|
Loading…
Reference in New Issue