varlink-idl: add infra to test our enum parsers against varlink IDL enums
In many cases we want to expose enums for which we have the usual xyz_to_string()/xyz_from_string() via Varlink as enums. Let's add some infra to test the tables against each other, to automatically detect when they deviate. In order to implement this properly, let's export/introduce clean json_underscorefy()/json_dashify(), for dealing with the fact that our enums usually use dash separates ames, but Varlink doesn't allow that. (This does not add the test cases for all enum types we expose right now, but only adds the general infra).
This commit is contained in:
committed by
Luca Boccassi
parent
79dd24cf14
commit
030f239a19
@@ -3,7 +3,7 @@
|
||||
#include "bus-polkit.h"
|
||||
#include "varlink-io.systemd.MountFileSystem.h"
|
||||
|
||||
static SD_VARLINK_DEFINE_ENUM_TYPE(
|
||||
SD_VARLINK_DEFINE_ENUM_TYPE(
|
||||
PartitionDesignator,
|
||||
SD_VARLINK_DEFINE_ENUM_VALUE(root),
|
||||
SD_VARLINK_DEFINE_ENUM_VALUE(usr),
|
||||
|
||||
Reference in New Issue
Block a user