On Thu, 2018-03-01 at 10:17 +0000, Frediano Ziglio wrote: > Options are global and should be ignored if not recognised by a > specific plugin as they can be used by other ones. Haven't realized that.. Acked-by: Lukáš Hrázký <lhrazky@xxxxxxxxxx> > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> > --- > src/mjpeg-fallback.cpp | 2 -- > src/unittests/test-mjpeg-fallback.cpp | 7 +++---- > 2 files changed, 3 insertions(+), 6 deletions(-) > > diff --git a/src/mjpeg-fallback.cpp b/src/mjpeg-fallback.cpp > index fd37167..68c282f 100644 > --- a/src/mjpeg-fallback.cpp > +++ b/src/mjpeg-fallback.cpp > @@ -165,8 +165,6 @@ void MjpegPlugin::ParseOptions(const ConfigureOption *options) > } catch (const std::exception &e) { > throw std::runtime_error("Invalid value '" + value + "' for option 'mjpeg.quality'."); > } > - } else { > - throw std::runtime_error("Invalid option '" + name + "'."); > } > } > } > diff --git a/src/unittests/test-mjpeg-fallback.cpp b/src/unittests/test-mjpeg-fallback.cpp > index 4a152fe..e39dc49 100644 > --- a/src/unittests/test-mjpeg-fallback.cpp > +++ b/src/unittests/test-mjpeg-fallback.cpp > @@ -32,10 +32,9 @@ SCENARIO("test parsing mjpeg plugin options", "[mjpeg][options]") { > {NULL, NULL} > }; > > - THEN("ParseOptions throws an exception") { > - REQUIRE_THROWS_WITH( > - plugin.ParseOptions(options.data()), > - "Invalid option 'wakaka'." > + THEN("ParseOptions should ignore the option") { > + REQUIRE_NOTHROW( > + plugin.ParseOptions(options.data()) > ); > } > } _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel