Add scaffolding for a new test-internals binary
* There is a gcal_tests_add_internal() function... * called from tests/test-internals.c... * ... which doesn't add any tests yet, but we'll have some soon. Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/550>
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
cdc602bb1f
commit
a0a817ee8a
@@ -949,3 +949,9 @@ gcal_schedule_values_free (GcalScheduleValues *values)
|
||||
|
||||
g_free (values);
|
||||
}
|
||||
|
||||
void
|
||||
gcal_schedule_section_add_tests (void)
|
||||
{
|
||||
/* g_test_add_func ("/event_editor/schedule_section/...", ...); */
|
||||
}
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
#include <adwaita.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "gcal-enums.h"
|
||||
#include "gcal-event.h"
|
||||
#include "gcal-recurrence.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GCAL_TYPE_SCHEDULE_SECTION (gcal_schedule_section_get_type())
|
||||
@@ -52,4 +56,8 @@ void gcal_schedule_values_free (GcalScheduleVa
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GcalScheduleValues, gcal_schedule_values_free);
|
||||
|
||||
/* Tests */
|
||||
|
||||
void gcal_schedule_section_add_tests (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#include <glib.h>
|
||||
|
||||
#include "gcal-tests.h"
|
||||
#include "event-editor/gcal-schedule-section.h"
|
||||
|
||||
/* Adds all the tests for the internals of the GUI.
|
||||
*
|
||||
* To avoid exporting lots of little test functions from each source file, add a single
|
||||
* gcal_foo_add_tests() that in turn adds unit tests for that file.
|
||||
*/
|
||||
void
|
||||
gcal_tests_add_internals (void)
|
||||
{
|
||||
gcal_schedule_section_add_tests ();
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void gcal_tests_add_internals (void);
|
||||
@@ -52,6 +52,7 @@ sources += files(
|
||||
'gcal-quick-add-popover.c',
|
||||
'gcal-search-button.c',
|
||||
'gcal-sync-indicator.c',
|
||||
'gcal-tests.c',
|
||||
'gcal-weather-settings.c',
|
||||
'gcal-window.c',
|
||||
)
|
||||
|
||||
@@ -35,6 +35,7 @@ tests = [
|
||||
'daylight-saving',
|
||||
#'discoverer', # https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1251
|
||||
'event',
|
||||
'internals',
|
||||
'range',
|
||||
'range-tree',
|
||||
#'server', # https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1251
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#include <glib.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include "gui/gcal-tests.h"
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
g_setenv ("TZ", "UTC", TRUE);
|
||||
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
g_test_bug_base ("https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/");
|
||||
|
||||
gcal_tests_add_internals ();
|
||||
|
||||
return g_test_run ();
|
||||
}
|
||||
Reference in New Issue
Block a user