MCPcopy Create free account
hub / github.com/canonical/mir / TEST_F

Function TEST_F

tests/unit-tests/input/evdev/test_libinput_device.cpp:359–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357}
358
359TEST_F(LibInputDevice, start_creates_and_refs_libinput_device)
360{
361 auto * const fake_device = setup_laptop_keyboard();
362
363 // according to manual when a new device is detected by udev libinput creates a temporary
364 // device with a ref count 0, which gets distributed via its event loop, and would be removed
365 // after event dispatch. So it needs a manual ref call
366 EXPECT_CALL(env.mock_libinput, libinput_device_ref(fake_device))
367 .Times(1);
368
369 mie::LibInputDevice dev(mir::report::null_input_report(),
370 mie::make_libinput_device(lib, fake_device));
371 dev.start(&mock_sink, &mock_builder);
372}
373
374TEST_F(LibInputDevice, unique_id_contains_device_name)
375{

Callers

nothing calls this directly

Tested by

no test coverage detected