Pessimisation: this breaks return value optimisation. When the Wily clang builds work again this will be an error.
+ EXPECT_THAT(platforms.size(), Eq(2)); // we cannot disable the default evdev platform with only umock dev is in place
+ EXPECT_THAT(platforms[0].get(), AnyOf(OfType<mi::evdev::Platform>(), OfType<mi::X::XInputPlatform>()));
+ EXPECT_THAT(platforms[1].get(), AnyOf(OfType<mi::evdev::Platform>(), OfType<mi::X::XInputPlatform>()));
Seems like you could replace OfType with OfPointerType and then use
Which I think is both more natural and also is a slightly stronger test.
========================
Non-review comment:
+ mtf::UdevEnvironment env; // TODO replace with mock_libevdev und mock_libudev when the new input reading stack is the only in use.
Heads up: I think that doing this will provide negative value. Also, und→and :)
+ mir::log_ info("Found input driver: %s", desc->name);
Could you also log driver version please?
+ return std::move( platforms) ;
Pessimisation: this breaks return value optimisation. When the Wily clang builds work again this will be an error.
+ EXPECT_ THAT(platforms. size(), Eq(2)); // we cannot disable the default evdev platform with only umock dev is in place THAT(platforms[ 0].get( ), AnyOf(OfType< mi::evdev: :Platform> (), OfType< mi::X:: XInputPlatform> ())); THAT(platforms[ 1].get( ), AnyOf(OfType< mi::evdev: :Platform> (), OfType< mi::X:: XInputPlatform> ()));
+ EXPECT_
+ EXPECT_
Seems like you could replace OfType with OfPointerType and then use
EXPECT_ THAT(platforms, UnorderedElemen tsAre(OfPointer Type<mi: :evdev: :Platform> (), OfPointerType< mi::X:: XInputPlatform> ());
Which I think is both more natural and also is a slightly stronger test.
======= ======= ======= === nment env; // TODO replace with mock_libevdev und mock_libudev when the new input reading stack is the only in use.
Non-review comment:
+ mtf::UdevEnviro
Heads up: I think that doing this will provide negative value. Also, und→and :)