Commit Graph

971 Commits

Author SHA1 Message Date
Matthias Clasen
3121f88265 build: Drop the install-tests option
We no longer use installed tests in CI,
so lets reap the benefit and simplify
our build setup for tests.
2022-12-19 23:12:47 -05:00
Matthias Clasen
fba4cea2e8 testsuite: Stop using gtk_widget_show/hide 2022-12-13 13:46:02 -05:00
Simon McVittie
94b57a967c testsuite: Don't create .test files for flaky or failing tests
These tests can be run manually, but are not suitable for use as an
acceptance test, so let's not make frameworks like Debian's autopkgtest
run these when they run ginsttest-runner in the most obvious way.

Signed-off-by: Simon McVittie <smcv@debian.org>
2022-11-24 13:46:33 +00:00
Simon McVittie
957dd49ef7 testsuite: Use separate setups for unstable tests instead of should_fail
There are two possible interpretations of "expected failure": either
the test *must* fail (exactly the inverse of an ordinary test, with
success becoming failure and failure becoming success), or the test
*may* fail (with success intended, but failure possible in some
environments). Autotools had the second interpretation, which seems
more useful in practice, but Meson has the first.

Instead of using should_fail, we can put the tests in one of two new
suites: "flaky" is intended for tests that succeed or fail unpredictably
according to the test environment or chance, while "failing" is for
tests that ought to succeed but currently never do as a result of a
bug or missing functionality. With a sufficiently new version of Meson,
the flaky and failing tests are not run by default, but can be requested
by running a setup that does not exclude them, with a command like:

    meson test --setup=x11_unstable --suite=flaky --suite=failing

As a bonus, now that we're setting up setups and their excluded suites
programmatically, the gsk-compare-broadway tests are also excluded by
default when running the test setup for a non-broadway backend.

When running the tests in CI, --suite=gtk overrides the default
exclude_suites, so we have to specify --no-suite=flaky and
--no-suite=failing explicitly.

This arrangement is inspired by GNOME/glib!2987, which was contributed
by Marco Trevisan.

Signed-off-by: Simon McVittie <smcv@debian.org>
2022-11-24 13:46:33 +00:00
Matthias Clasen
d34ac99916 filefilter: Add properties for the criteria
Add construct-only properties for patterns,
suffixes and mime-types. This provides an
alternative way to specify these in ui files.

Related: #5350
2022-11-21 22:44:03 -05:00
Matthias Clasen
f0aefe2f7f stringlist: Add a construct-only strings property
This enables creating string lists in ui files
without using custom markup.

Related: #5350
2022-11-20 14:07:45 -05:00
Matthias Clasen
9682085e09 builder: Parse PangoAttrList values
Allow specifying PangoAttrList properties in the
serialized format supported by pango_attr_list_to_string().

Test included.
2022-11-18 10:42:50 -05:00
Matthias Clasen
ebe6d52252 Drop redundant glib version checks
We require GLib 2.72 now.
2022-11-17 22:49:56 -05:00
Matthias Clasen
e619d45ddc Add a test for picker button constructors
This turns out to be hard enough that a test
is useful.
2022-11-07 15:32:51 +01:00
Matthias Clasen
5cb84afaa9 Add a test for POTFILES.in
Add a test that runs make-pot. This will only pass
if you've updated po/POTFILES.in and .skip after
moving source files around.

Unfortunately, it won't catch new source files that
are missing.
2022-10-30 08:52:02 -04:00
Matthias Clasen
f54ab91ff3 Deprecate GtkFileChooser and implementations
These are being replaced by GtkFileDialog.

This commit only moves the headers for GtkFileChooserWidget and
GtkFileChooserDialog to deprecated/, and keeps the implementations
in gtk/, since they will eventually be salvaged into a private
GtkFileChooserWindow.
2022-10-29 13:31:41 -04:00
Matthias Clasen
a51a6a3ee2 Deprecate GtkColorChooser and implementations
These are being replaced by GtkColorDialog
and GtkColorDialogButton.

This commit only moves the headers for GtkColorChooserWidget
and GtkColorChooserDialog to deprecated/, and keeps the
implementations in gtk/, since they will eventually be
salvaged into a private GtkColorChooserWindow.
2022-10-29 13:31:41 -04:00
Matthias Clasen
aeacc8f3c5 Add GtkFontDialogButton
This is like GtkColorDialogButton, but for fonts.
2022-10-29 13:31:41 -04:00
Matthias Clasen
7d0ebe02db Add GtkFontDialog
This is similar to GtkColorDialog, but for fonts.
2022-10-29 13:31:41 -04:00
Matthias Clasen
655675e6a1 Add GtkColorDialogButton
This is a new color button implementation
built around GtkColorDialog.
2022-10-29 13:02:15 -04:00
Matthias Clasen
c32fed9238 testsuite: Ignore deprecations
For now, just ignore deprecations. Eventually,
we will have to go through, drop demos that are
for wholly deprecated widgets, and update others.
2022-10-11 17:18:21 -04:00
Matthias Clasen
5e256590db Deprecate treeviews and cell renderers
This includes

GtkCellArea
GtkCellAreaBox
GtkCellAreaContext
GtkCellEditable
GtkCellRenderer
GtkCellRendererAccel
GtkCellRendererCombo
GtkCellRendererPixbuf
GtkCellRendererProgress
GtkCellRendererSpin
GtkCellRendererSpinner
GtkCellRendererText
GtkCellRendererToggle
GtkCellView
GtkComboBox
GtkComboBoxText
GtkIconView
GtkListStore
GtkTreeModel
GtkTreeModelFilter
GtkTreeModelSort
GtkTreeStore
GtkTreeView
GtkTreeViewColumn
GtkTreeSelection
2022-10-11 17:18:21 -04:00
Matthias Clasen
7c5e1c6195 gtk: Rename some private headers
Improve the consistency of our private header
naming, by add 'private' to a bunch of them.
2022-10-05 23:01:28 -04:00
Matthias Clasen
7e9ca5b41d Deprecate GtkEntryCompletion
We want to drop cell renderers and tree models
in GTK 5. The functionality of GtkEntryCompletion
may be replaced by a new widget in GTK 5.
2022-10-03 23:23:56 -04:00
Matthias Clasen
a527a4d82e Deprecate the app chooser widgets
These are a family of pretty specialized widgets, and
are very rarely used. Instead of porting them away
from GtkTreeView and GtkComboBox, deprecate them.
2022-10-03 23:02:09 -04:00
Matthias Clasen
1e65d6640f tests: Rewrite the icontheme tests
The lookup order tests were relying on out
debug spew using g_log, so they can redirect
the output by setting a log writer function.

Rewrite this to use g_test_subprocess() and
parse stderr.
2022-09-23 18:12:39 -04:00
Matthias Clasen
72d6241c84 Add a test for short compose sequences
Add a table that has a short sequence
to verify that we can parse this.
2022-09-12 22:30:47 -04:00
Matthias Clasen
aac3f1860f Update test results
The table sizes change, even though none of our
test tables include short sequences.
2022-09-12 22:30:47 -04:00
Matthias Clasen
83bf193218 Add a test for treelistmodel row collapse
Test that we can expand and collapse a row, and then
add another child below it, without crashing.

Adapted from the testcase in #4595.

This tests the fix in the previous commit.
2022-08-24 08:23:22 -04:00
Simon McVittie
3cfe04aa74 icontheme test: Assert that the subprocess passed
Noticed while backporting GLogWriterFunc fixes to 3.24.x (#5119).

Signed-off-by: Simon McVittie <smcv@debian.org>
2022-08-20 19:38:29 +01:00
Marc-André Lureau
3585da6b7f build-sys: fix linker warning on win32
[196/296] Linking target testsuite/gtk/builder.exe
/usr/lib/gcc/x86_64-w64-mingw32/11.2.1/../../../../x86_64-w64-mingw32/bin/ld: warning: --export-dynamic is not supported for PE+ targets, did you mean --export-all-symbols?

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-08-18 11:44:34 +04:00
Emmanuele Bassi
6c37158bbc Re-enable the TextBuffer wrap-mode serialization test
The private serialization function is now available on all platforms.
2022-08-04 23:39:54 +01:00
Emmanuele Bassi
d030c92d63 Move private function out of the AT-SPI a11y backend
The textbuffer test is calling into a function defined by the AT-SPI
accessibility backend. As of commit 4ddf1b70 we only build and run the
test on Linux, but the function in question isn't really
accessibility-related: it's just a serialization function.
2022-08-04 23:34:41 +01:00
Matthias Clasen
eb1a2268bb gtk: Improve test coverage 2022-07-18 07:08:01 -05:00
Matthias Clasen
64193ae706 sortlistmodel: Add more tests 2022-07-18 07:08:01 -05:00
Matthias Clasen
4682eb214a filterlistmodel: Add more tests 2022-07-18 07:08:01 -05:00
Matthias Clasen
d840e082e6 slicelistmodel: Improve a test
Make sure that replacements in the underlying model
don't affect the slice list model if they are outside
the slice window.
2022-07-17 06:32:15 -04:00
Matthias Clasen
2ed954d307 sortlistmodel: Add a test
Add  a test to prove that additions and removals
in the underlying model show up as expected.
2022-07-17 06:22:55 -04:00
Matthias Clasen
7b815768e0 filterlistmodel: Add a test
Test that items added in the underlying model show
up in the filter model (if they pass the filter).

Test removals as well.

See #5050
2022-07-17 06:22:31 -04:00
Matthias Clasen
42042e6811 Add some tests for GtkNoSelection 2022-07-15 15:46:06 -04:00
Matthias Clasen
f8f669b895 Add some tests for the listlistmodel 2022-07-15 15:46:06 -04:00
Matthias Clasen
fa1daf50a7 Add more maplistmodel tests
Add some tests for adding and removing items.
2022-07-14 17:04:02 -04:00
Matthias Clasen
b3ecc40cf1 testsuite: Fix up a few test for GtkStackPage changes
GtkStackPage objects can no longer be freely created.
Update our generic object tests to take that into
account.
2022-07-13 15:03:05 +01:00
Benjamin Otte
62096ebd16 filterlistmodel: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:22 +02:00
Benjamin Otte
f7b8184b00 fattenlistmodel: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:21 +02:00
Benjamin Otte
b6ba8ecbd0 maplistmodel: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:20 +02:00
Benjamin Otte
0e42fa95b1 multiselection: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:19 +02:00
Benjamin Otte
67e336992f propertylookuplistmodel: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:18 +02:00
Benjamin Otte
0f829c4599 singleselection: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:16 +02:00
Benjamin Otte
3fca865625 slicelistmodel: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:16 +02:00
Benjamin Otte
bf8b26aa27 sortlistmodel: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:15 +02:00
Benjamin Otte
fd4562aac9 treelistmodel: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:14 +02:00
Matthias Clasen
73dc741a82 Avoid g_log_set_writer_func in tests
It is not usable anymore since GLib 2.72.
2022-05-28 10:43:26 -04:00
Sophie Herold
f5fc71fe82 tests: Check for nicks and blurbs not being set 2022-05-11 18:16:44 +02:00
Matthias Clasen
0ce49daa5f testsuite: test new treestore builder functionality
Verify that we can nest rows.
2022-05-06 09:29:44 -04:00