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
e8e69a1208
Make clipboard tests work with portals
...
This was not working right, since it hasn't been
tested with portals - there are no portals in ci.
2022-09-07 08:45:31 -04:00
Matthias Clasen
9cc1dcf2a4
4.8.0
2022-09-06 15:59:04 -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
Matthias Clasen
6c3119bc33
tests: Check the error first
...
The error contains useful information when
things fail, so check it first to get useful
output in case of failure.
2022-08-11 07:29:56 -04:00
Emmanuele Bassi
ba1a084899
Apply 1 suggestion(s) to 1 file(s)
2022-08-07 18:54:19 +00:00
Hannes Müller
703fc51d8e
build: fix for use with glib 2.66.0
...
Add missing #define g_memdup2() for gdksurface-broadway.c in case of enabled
broadway-backend as used otherwise.
Copy static would_drop() replacement for g_log_writer_default_would_drop()
from gtk-builder-tool.c to gtk-reftest.c
2022-08-06 21:11:08 +02: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
edf8c9e501
Merge branch 'matthiasc/for-main' into 'main'
...
css: Fix handling of transform values
See merge request GNOME/gtk!4890
2022-07-18 14:24:49 +00:00
Matthias Clasen
03f24bb5cf
css: Improve test coverage
...
Among other things, this includes a test for the fix
in the previous commit.
2022-07-18 07:08:01 -05: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
Mat
89db59a40d
treepopover: Add support for scrolling
...
Add support for scrolling large tree popovers in a similar fashion to GtkPopoverMenu.
Fixes #3674
Fixes #4877
2022-07-18 00:44:28 +03: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
Benjamin Otte
188cb49b44
Merge branch 'content-fit-reftests' into 'main'
...
reftests: Add content-fit picture tests
See merge request GNOME/gtk!4879
2022-07-16 16:06:57 +00:00
Marco Melorio
6da65b25b6
reftests: Add content-fit picture tests
2022-07-16 17:53:13 +02:00
Matthias Clasen
61a843e824
gdk: Improve test coverage
2022-07-16 09:43:46 -04:00
Matthias Clasen
882c805b53
gdk: Improve test coverage
2022-07-16 09:43:46 -04:00
Matthias Clasen
63c61340ac
Merge branch 'test-coverage' into 'main'
...
node-editor: Make the help more helpful
See merge request GNOME/gtk!4874
2022-07-15 22:34:02 +00:00
Marco Melorio
d8a73cbd03
picture: Add content-fit property
...
It allows to specify the resize mode of the paintable inside the
GtkPicture allocation. This also deprecates the keep-aspect-ratio
property.
Fixes #5027 .
2022-07-15 23:01:23 +02:00
Matthias Clasen
5064a8eac0
gsk: Improve test coverage
2022-07-15 16:41:05 -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
2d14372142
reftests: Add an inscription xalign RTL test
...
This checks mainly that we do the right thing wrt PangoAlignment
weirdness.
0.25 and 0.75 are set to 0.0 and 1.0 currently because of Pango
limitations (and no desire to manually move lines).
But if that were to be fixed, both the ref and the test should update in
the same way and things should just keep working.
2022-06-13 06:49:22 +02:00
Benjamin Otte
4927b6e625
reftests: Add inscription reftest for xalign
...
Compare with labels again.
2022-06-13 06:49:11 +02:00
Matthias Clasen
62984d091a
Merge branch 'wip/otte/inscription' into 'main'
...
More inscription work
See merge request GNOME/gtk!4808
2022-06-12 01:38:40 +00:00
Benjamin Otte
4c1fc4f5d7
reftests: Test inscription multiline overflow
2022-06-12 02:42:00 +02:00
Benjamin Otte
4809efd630
reftests: Test overflowing inscription yalign
...
Overflowing inscriptions should always align to the top, even when half
an extra line is available.
2022-06-11 22:19:17 +02:00
Matthias Clasen
d88e935398
Merge branch 'wip/otte/listmodels' into 'main'
...
19 listmodels: Add ::item-type and ::n-items
See merge request GNOME/gtk!4807
2022-06-11 15:15:53 +00: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
Benjamin Otte
bf5edc6b7c
reftests: Add test for the overflow methods
...
Reference is using labels again
2022-06-11 02:15:08 +02:00
Benjamin Otte
9973a7173f
reftests: Add test for inscription markup parsing
...
Compare with label markup parsing as the reference.
2022-06-11 02:15:08 +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
Benjamin Otte
0410125f20
nodeparser: Fix parsing of color-matrix node
...
Negative offsets in the color matrix were inverted because it used the
rect parser.
2022-05-18 21:16:33 +02:00
Benjamin Otte
ffd3801b1d
testsuite: Add tests for label overdraw
...
This brings back a subset of what quit-mnemonic.ui tested for, but
trying a lot harder to trigger the label overdrawing its allocation,
which will cause the text to be cut off when clipping is happening.
It should not be an issue at all with GTK4, but keeping that test around
is a good idea.
2022-05-17 00:14:19 +02:00
Matthias Clasen
1b355ff2e0
Drop the quit-mnemonic reftest
...
I can't quite figure out what this test was meant
to test, and how to make it do so in a way that
does not fall afoul of rendering issues in the GL
renderer and rounding differences in pango.
Can't win with reftests.
2022-05-14 17:03:37 -04:00
Jason Francis
3fc7c97979
gtk: Set widget template children to NULL before destroy unref
2022-05-14 10:13:39 -04:00
Matthias Clasen
6164908bd3
Add tests for gdk_memory_texture_new_subtexture
...
This checks the fixes in the previous commit.
2022-05-13 11:44:11 -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
Matthias Clasen
10b5698b78
testsuite: Copy liststore builer tests for trees
...
This adds tests for data, but not nesting yet.
2022-05-06 09:29:44 -04:00
Matthias Clasen
c645da00dc
Merge branch 'wrap-mode-invalid-cast' into 'main'
...
Don't cast GtkWrapMode to the incompatible enum PangoWrapMode
Closes #4869
See merge request GNOME/gtk!4671
2022-05-03 17:46:51 +00:00
Federico Mena Quintero
4ddf1b70a2
Make the wrap_mode test unix-only
...
The relevant accessibility code is not built on Windows.
2022-04-28 09:46:48 -05:00
Federico Mena Quintero
898a2e9fcf
textbuffer: Test the serialization of the wrap-mode attribute
2022-04-26 20:22:59 -05:00
Federico Mena Quintero
ae06e40bcc
Put the text buffer tests in the internal_tests suite
...
We'll start testing the internal gtk_text_buffer_get_run_attributes()
soon.
2022-04-26 14:01:08 -05:00
Chun-wei Fan
65a7df47f2
Introspection test: Reverse os.add_dll_directory() order
...
It looks like os.add_dll_directory() works in a LIFO order, so we call
os.add_dll_directory() from the end of the list of directories in %PATH%
so that the directories are searched in the correct order.
2022-04-26 11:52:31 +08:00
Chun-wei Fan
3471c22f52
testsuite: Fix introspection test on Windows
...
...when we are using Python 3.8.x or later. Python 3.8.x or later on Windows
require one to call os.add_dll_directory() on every directory that contains
dependent non-system DLLs of a module that are not bundled/installed with the
module.
Since we are very likely running programs that rely on dependent items in
%PATH%, make things easier for people by calling os.add_dll_directory() on
all the valid paths in %PATH% in api.py, so that the test will run
successfully on Windows with Python 3.8.x or later.
2022-04-26 11:51:26 +08:00
Matthias Clasen
c882a611c8
Fix file filter buildable support
...
File filters creates from ui files had some
extraneous gunk in them. Fix that. Test included.
Fixes : #4787
2022-04-18 23:03:15 -04:00
Sebastian Keller
1c733857b3
testsuite: Add unaligned-offscreen test
...
Tests whether text rendered to an offscreen node unaligned with the
pixel grid introduces blurriness.
2022-04-04 23:48:58 +02:00
James Westman
8eb9844a45
filefilter: Fix <suffixes> in buildable
...
A bug in GtkFileFilter's GtkBuildable implementation caused the
<suffixes> tag not to be recognized.
2022-03-17 10:52:20 -05:00
Sebastien Bacher
c44288c739
Use the correct name for installed gdk tests
2022-03-07 16:13:38 +01:00
Benjamin Otte
b28c3ef3d9
renderers: Handle large viewports
...
When large viewports are passed to gsk_renderer_render_texture(), don't
fail (or even return NULL).
Instead, draw multiple tiles and assemble them into a memory texture.
Tests added to the testsuite for this.
2022-02-26 20:35:44 +01:00
Matthias Clasen
c5f92340ee
Fix up tests for version bump
2022-02-23 14:29:48 -05:00
Benjamin Otte
481634930c
glcontext: Remove leftover function call
...
That call should have been removed way back when.
Add a testcase to make sure this keeps working.
Fixes #4697
2022-02-16 03:48:15 +01:00
Emmanuele Bassi
23aec81f1a
reftest: Avoid assertions being compiled out
...
Calling functions inside a g_assert() means those functions will be
compiled out when building with G_DISABLE_ASSERT.
This fixes the release job in the CI pipeline.
2022-01-18 14:07:37 +00:00
Emmanuele Bassi
20ad839075
tests: Don't drop chdir()'s return value on the floor
...
Avoid a compile time warning, and ensure that the test suite is actually
doing its job.
2022-01-08 15:17:25 +00:00
Benjamin Otte
8e8a746cce
Merge branch 'wip/otte/for-main' into 'main'
...
testsuite: clear_current() when done
See merge request GNOME/gtk!4343
2022-01-06 19:07:58 +00:00
Benjamin Otte
7872b41f16
testsuite: clear_current() when done
...
That way we ensure that the GL context(s) get disposed, which they
previously weren't due to them still being the current context.
This also implicitly adds testing of gLContext destruction, which
previously wasn't ever done by any test.
2022-01-06 19:22:47 +01:00
Matthias Clasen
70cb61fb71
4.6.0
2021-12-30 10:31:52 -05:00
Matthias Clasen
dd0effe957
Merge branch 'wip/chergert/4575-fix-texthistory-selection' into 'main'
...
testsuite: ignore texthistory selection on delete/backspace
Closes #4575
See merge request GNOME/gtk!4287
2021-12-29 14:58:53 +00:00
Benjamin Otte
df8588e9b7
Merge branch 'wip/otte/for-main' into 'main'
...
widget: Don't queue an allocate on a nonexisting parent
See merge request GNOME/gtk!4288
2021-12-26 23:20:34 +00:00
Benjamin Otte
fce9b35e4d
css: Don't crash on invalid rotate3d()
2021-12-26 22:58:09 +01:00
Christian Hergert
99d8dd751e
testsuite: add failing test for delete selection
...
This adds a test to expose the failure of #4575 which results in the
selection being incorrect when performing a delete as we are likely
already in a begin_user_action()/end_user_action() pair.
Related #4575
2021-12-26 12:46:16 -08:00
Christian Hergert
22b1abb36d
testsuite: ignore texthistory selection on delete/backspace
...
We don't need to apply these here, as it will clear the selection which is
needed for the undo. Otherwise we won't be able to test that we end up at
the right selection afterwards.
2021-12-26 12:43:22 -08:00
Emmanuele Bassi
a70988ecd5
build: Remove deprecated get_pkgconfig_variable()
...
Replace it with `get_variable(pkgconfig:...)`.
2021-12-24 15:55:26 +00:00
Maxim Cournoyer
29e6cc5808
testsuite: introspection: Do not override environment variables.
...
Functional package managers such as GNU Guix rely on environment
variables such as GI_TYPELIB_PATH to discover the system libraries and
resources; extend rather than override them.
* testsuite/introspection/meson.build (env): New variable that extends
rather than override the GI_TYPELIB_PATH and LD_PRELOAD environment
variables.
(api): Use the above as the value of the 'env' keyword argument.
2021-12-20 11:22:41 -05:00
Matthias Clasen
69edf17c2a
Merge branch 'wip/otte/wrapping-is-natural' into 'main'
...
label: Add gtk_label_set_natural_wrap_mode()
See merge request GNOME/gtk!4267
2021-12-20 15:49:05 +00:00
Benjamin Otte
981ed22dff
label: Add gtk_label_set_natural_wrap_mode()
...
Allows influencing natural size requests so that labels can request more
width than necessary for a given height.
Related: !4245
Related: #4535
2021-12-20 02:28:37 +01:00
Emmanuele Bassi
c94996e8e8
build: Check for the gi python module
...
The introspection tests depend on the pygobject module, but we currently
are not checking if it's available at configuration time, which means we
can get build failures like:
> ModuleNotFoundError: No module named 'gi'
when running the test suite.
2021-12-19 16:06:49 +00:00
Matthias Clasen
47ac080565
Merge branch 'wip/otte/for-main' into 'main'
...
label: word-char wrapping should word-wrap for natural size
Closes #4535
See merge request GNOME/gtk!4245
2021-12-17 02:11:50 +00:00
Timm Bäder
e411081c84
settings test: Print expected and seen values
...
That test breaks locally (and in CI it seems?), so at least print the
values we see.
2021-12-16 11:06:50 +01:00
Benjamin Otte
5face79cd0
label: word-char wrapping should word-wrap for natural size
...
Testcase added
Fixes #4535
2021-12-13 14:49:39 +01:00
Timm Bäder
fd6b3ef5a0
gl: Linear gradients don't support 3d transforms
...
Add another helper similar to the one for transforms, but that only
works on 2d transforms.
Fixes #4501
2021-12-12 12:57:44 +01:00
Benjamin Otte
4de5d225db
reftests: Add center-center reftests without GtkOverlay
2021-12-08 22:16:52 +03:00
Benjamin Otte
7741df9963
reftests: Rename a bunch of tests
...
They use a GtkOverlay, so reflect that in the name.
2021-12-08 22:16:52 +03:00
Ivan Molodetskikh
7ef54e9c53
picture: Return natural size 0 for size 0
...
It was returning the full natural size (same as -1) due to default value
handling in the code below.
Tests have been updated to match this output.
2021-12-08 19:20:24 +01:00
Matthias Clasen
2f7fa10434
Merge branch 'textview-im-surrounding' into 'main'
...
textview: Provide more context to input methods
See merge request GNOME/gtk!4209
2021-12-03 20:26:54 +00:00
Matthias Clasen
d5c01098fd
textview: Provide more context to input methods
...
When returning surrounding context to input methods,
include at least 2 words before and after the insertion
point.
Update the affected input method tests.
2021-12-03 14:44:05 -05:00
Georg Vienna
c517e945de
textchildanchor: allow to specify replacement character
2021-12-03 16:02:48 +00:00
Benjamin Otte
07cfdd8ca0
label: Don't set ellipsized size as natural size
...
Natural size should never ellipsize.
Tests added.
2021-11-30 15:10:02 +01:00
Benjamin Otte
354fa6544a
texture: Remove gdk_texture_download_float()
...
The download API is not well thought out yet, so postpone it until
there's an actual usecase for it.
Remove testcases, too.
2021-11-30 14:12:10 +01:00
Benjamin Otte
ce8faa2e90
testsuite: Make function arguments const
2021-11-30 14:12:10 +01:00
Benjamin Otte
27965d5fdc
builder-tool: Don't simplify enums too much
...
Store the enum nick, not the enum value. That way the file remains
human-readable.
Updated reftests to new expected output.
2021-11-21 02:19:57 +01:00