[PATCH 1/2] testbot: Make sure optional enum properties are not used.
Francois Gouget
fgouget at codeweavers.com
Mon Jun 4 13:06:36 CDT 2018
They are not supported and trying to set them to an undefined value
will trigger errors.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
testbot/lib/ObjectModel/EnumPropertyDescriptor.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/testbot/lib/ObjectModel/EnumPropertyDescriptor.pm b/testbot/lib/ObjectModel/EnumPropertyDescriptor.pm
index d5850698e..d8f0d391b 100644
--- a/testbot/lib/ObjectModel/EnumPropertyDescriptor.pm
+++ b/testbot/lib/ObjectModel/EnumPropertyDescriptor.pm
@@ -42,6 +42,10 @@ sub _initialize($$)
$self->{Class} = "Enum";
$self->{Values} = $Values;
+ if (!$self->{IsRequired})
+ {
+ die "Optional enum properties are not supported\n";
+ }
$self->SUPER::_initialize();
}
--
2.17.0
More information about the wine-devel
mailing list