1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-04 18:57:37 +00:00

tests: Don't mock calls_contacts_provider_new()

Having set which folks backends to use the real function can be used
without causing any warnings leading to the build to fail.
This commit is contained in:
Evangelos Ribeiro Tzaras 2023-01-15 10:49:12 +01:00
parent b6bdfaca99
commit e5a6ace32d
5 changed files with 3 additions and 45 deletions

View file

@ -23,16 +23,12 @@ test_link_args = [
'-fPIC',
]
mock_link_args = [ test_link_args,
'-Wl,--wrap=calls_contacts_provider_new',
]
test_sources = [ 'test-manager.c' ]
t = executable('manager', test_sources,
c_args : test_cflags,
link_args: mock_link_args,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies: calls_deps,
@ -73,7 +69,7 @@ test('util', t, env: test_env)
test_sources = [ 'test-ui-call.c', 'mock-call.c', 'mock-call.h' ]
t = executable('ui-call', test_sources,
c_args : test_cflags,
link_args : mock_link_args,
link_args : test_link_args,
pie: true,
link_with : [calls_vala, libcalls],
dependencies : calls_deps,
@ -90,7 +86,7 @@ test_sources = [
t = executable('ringer', test_sources,
c_args : test_cflags,
link_args: mock_link_args,
link_args: test_link_args,
pie: true,
link_with : [calls_vala, libcalls, libfeedback],
dependencies: calls_deps,

View file

@ -1,14 +0,0 @@
/*
* Copyright (C) 2021 Purism SPC
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Author: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu>
*
*/
#pragma once
#include "calls-contacts-provider.h"
CallsContactsProvider *__wrap_calls_contacts_provider_new (void);

View file

@ -5,18 +5,11 @@
*/
#include "calls-manager.h"
#include "mock-contacts-provider.h"
#include <cui-call.h>
#include <gtk/gtk.h>
#include <libpeas/peas.h>
CallsContactsProvider *
__wrap_calls_contacts_provider_new (void)
{
return NULL;
}
struct TestData {
GMainLoop *loop;
CallsManager *manager;

View file

@ -11,15 +11,6 @@
#include "calls-ringer.h"
#include "calls-ui-call-data.h"
#include "mock-call.h"
#include "mock-contacts-provider.h"
/* mock calls_contacts_provider_new() */
CallsContactsProvider *
__wrap_calls_contacts_provider_new (void)
{
return NULL;
}
/* add or remove calls */

View file

@ -9,17 +9,9 @@
#include "calls-ui-call-data.h"
#include "mock-call.h"
#include "mock-contacts-provider.h"
#include <gtk/gtk.h>
CallsContactsProvider *
__wrap_calls_contacts_provider_new (void)
{
return NULL;
}
static void
test_cui_call_state_mapping (void)
{