litest_assert_notnull(format);
}
+
+static int open_restricted(const char *path, int flags, void *data)
+{
+ int fd;
+ fd = open(path, flags);
+ return fd < 0 ? -errno : fd;
+}
+static void close_restricted(int fd, void *data)
+{
+ close(fd);
+}
+
+static const struct libinput_interface simple_interface = {
+ .open_restricted = open_restricted,
+ .close_restricted = close_restricted,
+};
+
START_TEST(log_default_priority)
{
enum libinput_log_priority pri;
struct libinput *li;
- li = litest_create_context();
+ li = libinput_path_create_context(&simple_interface, NULL);
pri = libinput_log_get_priority(li);
ck_assert_int_eq(pri, LIBINPUT_LOG_PRIORITY_ERROR);
- litest_destroy_context(li);
+ libinput_unref(li);
}
END_TEST