File: test-lockshield.c

package info (click to toggle)
phosh 0.51.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 9,620 kB
  • sloc: ansic: 81,727; xml: 3,903; python: 502; sh: 456; makefile: 34; lisp: 22; javascript: 6
file content (34 lines) | stat: -rw-r--r-- 815 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * Copyright (C) 2020 Purism SPC
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 * Author: Guido Günther <agx@sigxcpu.org>
 */

#include "testlib-compositor.h"

#include "lockshield.h"

static void
test_lockshield_new (PhoshTestCompositorFixture *fixture, gconstpointer unused)
{
  PhoshMonitor *monitor = phosh_test_get_monitor (fixture->state);
  GtkWidget *panel = phosh_lockshield_new (phosh_wayland_get_zwlr_layer_shell_v1(fixture->state->wl),
                                           monitor);

  g_assert_true (PHOSH_IS_LOCKSHIELD (panel));
  gtk_widget_set_visible (panel, TRUE);
  gtk_widget_destroy (panel);
}

int
main (int   argc,
      char *argv[])
{
  g_test_init (&argc, &argv, NULL);

  PHOSH_COMPOSITOR_TEST_ADD ("/phosh/lockshield/new", test_lockshield_new);

  return g_test_run ();
}