mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 02:06:18 +01:00
Update logging tests
We now treat the PRIORITY field like other string fields, and set its length to -1. Adapt the tests for this.
This commit is contained in:
parent
6a07885a98
commit
df457c9110
@ -428,7 +428,7 @@ test_structured_logging_roundtrip1 (void)
|
||||
gint some_integer = 123;
|
||||
const GLogField fields[] = {
|
||||
{ "GLIB_DOMAIN", "some-domain", -1 },
|
||||
{ "PRIORITY", "5", 1 },
|
||||
{ "PRIORITY", "5", -1 },
|
||||
{ "MESSAGE", "This is a debug message about pointer 0x100 and integer 123.", -1 },
|
||||
{ "MESSAGE_ID", "fcfb2e1e65c3494386b74878f1abf893", -1 },
|
||||
{ "MY_APPLICATION_CUSTOM_FIELD", "some debug string", -1 }
|
||||
@ -462,7 +462,7 @@ test_structured_logging_roundtrip2 (void)
|
||||
const gchar *some_string = "abc";
|
||||
const GLogField fields[] = {
|
||||
{ "GLIB_DOMAIN", "some-domain", -1 },
|
||||
{ "PRIORITY", "5", 1 },
|
||||
{ "PRIORITY", "5", -1 },
|
||||
{ "MESSAGE", "This is a debug message about string 'abc'.", -1 },
|
||||
{ "MESSAGE_ID", "fcfb2e1e65c3494386b74878f1abf893", -1 },
|
||||
{ "MY_APPLICATION_CUSTOM_FIELD", "some debug string", -1 }
|
||||
@ -486,7 +486,7 @@ test_structured_logging_roundtrip3 (void)
|
||||
{
|
||||
const GLogField fields[] = {
|
||||
{ "GLIB_DOMAIN", "some-domain", -1 },
|
||||
{ "PRIORITY", "4", 1 },
|
||||
{ "PRIORITY", "4", -1 },
|
||||
{ "MESSAGE", "Test test test.", -1 }
|
||||
};
|
||||
ExpectedMessage expected = { fields, 3 };
|
||||
|
Loading…
Reference in New Issue
Block a user