| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
|
| 3 |
#include "cgroup.h" |
| 4 |
#include "emergency-action.h" |
| 5 |
#include "execute.h" |
| 6 |
#include "log.h" |
| 7 |
#include "tests.h" |
| 8 |
#include "test-varlink-idl-util.h" |
| 9 |
#include "unit.h" |
| 10 |
#include "varlink-idl-common.h" |
| 11 |
#include "varlink-io.systemd.Manager.h" |
| 12 |
|
| 13 |
TEST(manager_enums_idl) { |
| 14 |
/* ManagerContext enums */ |
| 15 |
TEST_IDL_ENUM(LogTarget, log_target, vl_type_LogTarget); |
| 16 |
TEST_IDL_ENUM(OOMPolicy, oom_policy, vl_type_OOMPolicy); |
| 17 |
|
| 18 |
/* ExecOutput values like "kmsg+console" contain '+' which becomes '_' via underscorify, |
| 19 |
* but dashify won't restore it, so from_string round-trip fails. Test to_string direction only. */ |
| 20 |
TEST_IDL_ENUM_TO_STRING(ExecOutput, exec_output, vl_type_ExecOutputType); |
| 21 |
TEST_IDL_ENUM(CGroupPressureWatch, cgroup_pressure_watch, vl_type_CGroupPressureWatch); |
| 22 |
TEST_IDL_ENUM(EmergencyAction, emergency_action, vl_type_EmergencyAction); |
| 23 |
} |
| 24 |
|
| 25 |
DEFINE_TEST_MAIN(LOG_DEBUG); |