e17bf88d5e
This introduces a MetaContext implementation aimed to be used for test cases, with as little boiler plate as possible needed in the test. It currently doesn't do anything, just fills out the GObject boiler plate and sets a name. Build it into every core test, for compilation, even though it isn't used anywhere yet. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
53 lines
1.3 KiB
C
53 lines
1.3 KiB
C
/*
|
|
* Copyright (C) 2021 Red Hat Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License as
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
* 02111-1307, USA.
|
|
*
|
|
*/
|
|
|
|
#include "config.h"
|
|
|
|
#include "tests/meta-context-test.h"
|
|
|
|
struct _MetaContextTest
|
|
{
|
|
GObject parent;
|
|
};
|
|
|
|
G_DEFINE_TYPE (MetaContextTest, meta_context_test, META_TYPE_CONTEXT)
|
|
|
|
MetaContext *
|
|
meta_create_test_context (void)
|
|
{
|
|
MetaContextTest *context_test;
|
|
|
|
context_test = g_object_new (META_TYPE_CONTEXT_TEST,
|
|
"name", "Mutter Test",
|
|
NULL);
|
|
|
|
return META_CONTEXT (context_test);
|
|
}
|
|
|
|
static void
|
|
meta_context_test_class_init (MetaContextTestClass *klass)
|
|
{
|
|
}
|
|
|
|
static void
|
|
meta_context_test_init (MetaContextTest *context_test)
|
|
{
|
|
}
|