HALF ECHO LEARN / REFERENCE COLLECTION
v262.2src/test/test-varlink-idl-login.c
Git blob: fb8ef813637489bd019d53c7b510c3548d740cc1
Lines 1–22 of 22
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "logind-inhibit.h"
#include "logind-session.h"
#include "tests.h"
#include "test-varlink-idl-util.h"
#include "varlink-io.systemd.Login.h"
TEST(login_enums_idl) {
TEST_IDL_ENUM(SessionType, session_type, vl_type_SessionType);
/* SessionClass has SESSION_NONE ("none") as an internal sentinel that is intentionally not exposed
* via Varlink. Only validate the IDL→C direction. */
TEST_IDL_ENUM_FROM_STRING(SessionClass, session_class, vl_type_SessionClass);
TEST_IDL_ENUM(InhibitMode, inhibit_mode, vl_type_InhibitMode);
/* InhibitWhat is a bit-flag enum: inhibit_what_to_string() accepts a bitmask and
* the index does not correspond to a sequential integer, so the TEST_IDL_ENUM
* round-trip macro doesn't apply. The flag→string mapping is exercised through
* ListInhibitors integration tests in TEST-35-LOGIN.sh. */
}
DEFINE_TEST_MAIN(LOG_DEBUG);