Benjamin Otte
c9d748fc51
testsuite: Overhaul memorytexture test
...
Instead of hardcoding pixel values, allow construction of textures by
filling them with GdkRGBA values.
2021-09-12 05:54:37 +02:00
Benjamin Otte
9e11ea699c
Merge branch 'hsl' into 'master'
...
gdk_rgba_parse: Support HSL colors
See merge request GNOME/gtk!3899
2021-09-11 12:57:25 +00:00
Matthias Clasen
155a4fac5c
Add vectorized half-float conversion
...
We can't make the -4 versions inline, since
we use ifuncs for them, so make vectorized
versions.
Test included.
2021-09-10 22:17:31 -04:00
James Westman
0782c8a051
gdk_rgba_parse: Support HSL colors
2021-09-10 16:56:42 -05:00
Simon McVittie
16b9a30655
reftest-compare: Treat colour channels as undefined if alpha is zero
...
If the alpha channel is zero, it doesn't matter what the values of the
red, green and blue channels are: the pixel is still fully transparent.
On most architectures, fully transparent pixels end up all-zeroes
(fully transparent black), matching what's in the reference PNG file;
but on mips*el the blend-difference and blend-normal tests get all-ones
(fully transparent white) and a test failure.
Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/4227
Signed-off-by: Simon McVittie <smcv@debian.org>
2021-09-02 22:34:48 +01:00
Matthias Clasen
67495fcc77
Update settings tests
...
We have a new setting, so the test that is counting
settings needs an update.
2021-09-01 17:16:08 -04:00
Matthias Clasen
733fb527fa
Revert "reftests: Enforce default settings"
...
This reverts commit 4e4f57e091
.
This should not be necessary, since we have GDK_DEBUG=default-settings.
2021-08-30 11:01:22 -04:00
Simon McVittie
1071818df8
compose: Update sequences from libX11 1.7.2
...
This adds support for sequences like <Compose>,G,u -> capital G with
breve. Previously, only a capital U was accepted for E, G, I and O
(but a lower-case u was accepted for A and U for some reason).
Signed-off-by: Simon McVittie <smcv@debian.org>
2021-08-30 13:09:27 +01:00
Matthias Clasen
03ed585f6f
tests: Rewrite PangoAttribute introspection
...
We can use the new binding helpers to make this
a little less bothersome. That way, it will need
tweaks less often (only when new fundamental types
are introduced).
2021-08-24 12:53:48 -04:00
Matthias Clasen
ba95ef63da
Drop PANGO_VERSION_CHECK checks
...
We require Pango 1.49 now.
2021-08-22 15:26:23 -04:00
Matthias Clasen
8b2f28eee3
css: Add parser tests for line-height
2021-08-22 15:15:50 -04:00
Matthias Clasen
f95e9407a9
Fix up test output for new version
...
Annoying that this test has to be touched every time
we bump the version.
2021-08-22 14:48:12 -04:00
Matthias Clasen
fd885e42b0
Merge branch 'drop-gl' into 'master'
...
gsk: Drop the gl renderer
See merge request GNOME/gtk!3863
2021-08-22 17:04:25 +00:00
Matthias Clasen
ea31ae31c1
tests: Remove an outdated comment
...
It refers to a file that no longer exists.
2021-08-22 12:29:59 -04:00
Matthias Clasen
5feba67a3d
Handle new pango attribute type
...
Update all the places where we switch over
PangoAttrType to handle PANGO_ATTR_TEXT_TRANSFORM,
and do nothing for now - text-transform support
will land in 4.6.
2021-08-22 11:04:28 -04:00
Matthias Clasen
f1f197e3b9
4.4.0
2021-08-20 15:10:25 -04:00
Matthias Clasen
cedb6183e9
Fix imcontext tests
...
We should force our internal im context for these
tests, so we don't depend on the environment.
2021-08-20 15:10:25 -04:00
Matthias Clasen
528ebfabf0
Handle the new line height pango attribute
...
Update all the places where we switch over PangoAttributeType
to handle (and ignore, for now) the new line height attribute.
2021-08-10 08:22:52 -04:00
Matthias Clasen
e5e7f5dd88
ci: Disable treeview-headers-hidden reftest
...
Somebody needs to figure out why it fails in ci so
frequently.
2021-08-05 12:41:04 -04:00
Matthias Clasen
f7dc0dda4e
Merge branch 'big-keysyms' into 'master'
...
imcontext: Treat keysyms as 32bit values
Closes #4149
See merge request GNOME/gtk!3819
2021-08-03 01:05:16 +00:00
Matthias Clasen
6563b05d60
Add some GtkIMContext tests
...
For now, these check that the surrounding handling
in GtkText and GtkTextView is sane.
Fixes : #4151
2021-08-02 20:44:40 -04:00
Matthias Clasen
bbc36448fb
imcontext: Treat keysyms as 32bit values
...
Our compose table format is still limited to 16bit
values for keysyms, but what we see in key events
can be 32bit values, and we treat them as such now.
Fixes : #4149
2021-08-02 19:16:18 -04:00
Matthias Clasen
f59d2ae89d
Merge branch 'input-tweaks' into 'master'
...
imcontext: Tweak Compose sequence preedit
Closes #10 , #4127 , and #4124
See merge request GNOME/gtk!3799
2021-08-02 18:07:46 +00:00
Matthias Clasen
8a25f54e1f
Add more label parsing tests
...
Test various combinations of underline and markup
parsing.
2021-08-01 23:19:00 -04:00
Matthias Clasen
e67b2cb54b
composetable: Allow multiple dead keys
...
Remove the limitation on the number of dead keys
that we match, and allow the result be be multiple
characters.
Regenerate the builtin sequences, since this changes
what dead key sequences we can reproduce algorithmically.
Update tests to match.
Fixes : #10
2021-07-29 20:37:30 -04:00
Matthias Clasen
539391ce6c
composetable: Change an API
...
Make gtk_check_algorithmically take a GString
for the result. This is in preparation for allowing
multi-character results here, in the future.
Update all callers.
2021-07-29 17:29:25 -04:00
Matthias Clasen
67b568f464
testsuite: Set TEST_RESULT_DIR for tools tests
2021-07-28 22:42:46 -04:00
Matthias Clasen
910f23ea19
Merge branch 'wip/otte/widgetfactory-dnd' into 'master'
...
Improve DND
See merge request GNOME/gtk!3785
2021-07-27 04:12:58 +00:00
Benjamin Otte
d760332f00
testsuite: Add contentformat tests
2021-07-27 04:28:04 +02:00
Matthias Clasen
5c4aba4b9c
Merge branch 'wip/compose-parser' into 'master'
...
Clean up the GtkComposeTable api
See merge request GNOME/gtk!3746
2021-07-26 11:51:14 +00:00
Matthias Clasen
4e4f57e091
reftests: Enforce default settings
...
Set all settings to their default values, so we
are less dependent on the environment to be set
up just right. In particular, this fixes animations
being disabled when we happen to run in a vm.
2021-07-19 13:26:32 -04:00
Benjamin Otte
a76f515569
cssimagecrossfade: Don't abort() when failing to parse image
...
The code wasn't checking if parsing an image failed and just returning
success.
Testcase from bug is attached.
Fixes #4101
2021-07-16 17:50:09 +02:00
Matthias Clasen
a663b8c313
Merge branch 'fix-negative-scales' into 'master'
...
ngl: Handle negative scales
Closes #4096
See merge request GNOME/gtk!3755
2021-07-16 11:59:47 +00:00
Matthias Clasen
8390363abe
testsuite: Avoid negative scales with gl renderer
...
The fix in 1c90bb522e
was only for the ngl renderer,
so don't use the test with the gl renderer, until it is
fixed as well.
2021-07-16 07:11:20 -04:00
Matthias Clasen
6ff85d287a
Merge branch 'wip/chergert/fix-texthistory-insert' into 'master'
...
texthistory: fix calculation of n_chars
See merge request GNOME/gtk!3756
2021-07-16 11:04:21 +00:00
Christian Hergert
5d02a8f5db
texthistory: fix calculation of n_chars
...
This should be the number of characters, not the end position. This fixes
an issue where we wouldn't coalesce insert actions together.
2021-07-15 21:26:30 -07:00
Benjamin Otte
834d3749c6
testsuite: Add test for crasher
...
Test for the crasher in !4096
2021-07-15 23:43:28 +02:00
Matthias Clasen
87e2a02e0c
composetable: Rewrite Compose files if necessary
...
Apply heuristics to avoid breaking users existing configurations
with the change to not always add the default sequences.
If we find a cache that was generated before 4.4, and the Compose
file does not have an include, and doesn't contain so many sequences
that it is probably a copy of the system one, we take steps to keep
things working, and thell the user about it.
2021-07-15 09:30:09 -04:00
Matthias Clasen
264d592012
composetable: Keep the number of sequences
...
And print it out in tests.
Update all tests for this.
2021-07-15 09:30:01 -04:00
Matthias Clasen
0ad5094119
Remove some leftover debug code
2021-07-15 09:30:01 -04:00
Matthias Clasen
54dffa07f3
composetable: Drop GtkComposeTableCompact
...
All tables use the compact format now, and we generate
caches in that format too. Bump the cache version to 3
for this.
Replace the python script for generating the builtin table
by a small C program using the same code to generate the data
for the builtin table. This drops the restriction on only
generating a single character in the builtin sequences.
2021-07-13 22:03:23 -04:00
Matthias Clasen
485dc052ca
composetable: Allow removing sequences
...
Interpret an empty string as value in the Compose
file to mean: Remove this sequence.
Tests included.
2021-07-13 22:02:33 -04:00
Matthias Clasen
45d39c2802
composetable: Switch to using a hash table
...
This lets us naturally replace matching sequences
while parsing. That means that the semantics are now
"last one wins" if the parser sees multiple entries
for the same sequence.
Add a testcase that checks the new replacement semantics.
2021-07-13 22:02:33 -04:00
Matthias Clasen
3b4b1c6878
composetable: Reinterpret %L
...
When we see include "%L" in a Compose file, use the
builtin sequences. We no longer filter out duplicates
wrt. to the builtin sequences.
2021-07-13 22:02:33 -04:00
Matthias Clasen
ff4f07d76f
composetable: Handle substitutions in includes
...
Hande the %H, %L, %S substitutions that are described
in Compose(7).
Test included.
2021-07-13 22:02:33 -04:00
Matthias Clasen
fb6c8cd466
composetable: Handle includes
...
This adds the mechanics for parsing include lines in
Compose files. We do detect and prevent cycles.
Tests included.
2021-07-13 22:02:33 -04:00
Matthias Clasen
d25557a5ef
Clean up the GtkComposeTable api
...
Keep the list of composetables private to GtkIMContextSimple,
and just have an api that creates new GtkComposeTables, either
from a file or from data.
Update tests to use the new api.
2021-07-13 22:02:33 -04:00
Matthias Clasen
fab82a7c25
tests: Add some fp16 tests
2021-07-13 09:03:49 -04:00
Marco Trevisan (Treviño)
d5f2b69d0c
build: Get typelib dir dynamically using gobject-introspection dependency
...
We hardcoded the typelib directory for only an arch (and a distro),
while we can just get it from gobject-introspection pkg config if tests
are enabled.
2021-07-08 04:59:10 +02:00
Matthias Clasen
e415f25c8f
Add another text history test
...
Add a tests that checks we group undo actions as expected
when the user is typing.
2021-07-01 18:08:05 -04:00
Matthias Clasen
47bb556327
testsuite: Avoid a compiler warning
...
This was showing up in ci on macos.
2021-06-17 09:37:45 -04:00
Matthias Clasen
89f57d4ff6
Add a mnemonic testcase
...
Add a testcase that tests the label mnemonic handling
that was fixed in the previous commit.
2021-06-15 13:32:31 -04:00
Matthias Clasen
007cdf8787
Add tests for empty list models
...
Test that all our models return NULL for out-of-range
get_item calls, as expected.
2021-06-11 15:38:20 -04:00
Matthias Clasen
98d2320c93
gtk-builder-tool: Replace can-focus with focusable
...
The focusable property has the meaning that can-focus had
in GTK 3.
Update tests, and mention this in the migration guide.
Fixes : #3638
2021-06-05 17:56:35 -04:00
Matthias Clasen
9993e91add
Add GtkFileFilter tests
2021-06-04 21:10:01 -04:00
Matthias Clasen
47400e4bd8
Add a helper to make case-insensitive globs
...
This will be used in GtkFileFilter in the future.
Tests included.
2021-06-04 21:10:01 -04:00
Matthias Clasen
31407d0a4c
Move fnmatch testcases to the testsuite
...
We have a well-working way to test internal
apis now, lets use it for these tests.
2021-06-03 23:58:50 -04:00
Matthias Clasen
578db92973
Cosmetics: Eradicate gint
...
Remove a handful of errant uses of gint.
2021-06-03 17:41:28 -04:00
Matthias Clasen
0268c9d642
Add tests for text buffer history
...
Check that things can be undone.
2021-05-26 14:36:16 -04:00
Matthias Clasen
b2b044ce95
Move text history tests
...
We can test internal apis in our testsuite now,
so move the text history tests there, to have them
run in ci.
2021-05-26 07:34:28 -04:00
Matthias Clasen
04bac8ef2a
testsuite: Run some installed tests exclusively
...
My suspicion is that the clipboard (and some other)
installed test interferes with others, because the
clipboard is a shared resource.
2021-05-17 07:16:42 -04:00
Matthias Clasen
809299f9e4
Add some more transform tests
...
Test that gsk_transform_to_affine works.
2021-05-13 19:37:16 -04:00
Emmanuele Bassi
6189e343f3
build: Do not use C arguments with C++
...
Otherwise the C++ compiler will start to complain.
The C++ keyword test does not need additional warnings.
2021-05-11 12:24:34 +01:00
Matthias Clasen
a3f5283018
Add some calendar tests
...
Check that the getters and setters work as documented.
This tests the fix in 1f8985e476
.
2021-05-07 07:52:11 -04:00
Dan Cîrnaț
12d591178e
Fix compilation of c++ test: cpp_args
...
The correct meson argument for c++ is cpp_args.
Remove unnecessary(?) "-Idummy-headers" - breaks build
2021-05-06 10:38:41 +02:00
Matthias Clasen
6a24e0c7c3
Add an introspection api test
...
Every beginning is small... just check one constant for now.
2021-05-05 19:18:32 -04:00
Matthias Clasen
bafa23fa2c
Add debug spew to gdk tests
2021-05-05 15:41:46 -04:00
Matthias Clasen
3591da517a
Disable another font-challenged reftest
2021-05-05 08:17:26 -04:00
Matthias Clasen
4f81dc1eaf
Fix the icon-effect-missing reftest
...
This was comparing the included image-missing icon
with the one in the current icontheme on the test
system. Works fine as long as we don't change
the icons (which we just did). To avoid this, set
the icontheme to hicolor for this test, which does
not have the image-missing icon, so we end up getting
the builtin icon for both ui files.
2021-05-04 16:21:37 -04:00
Chun-wei Fan
e56754d27c
clipboard-client.c: Include necessary headers for Windows
...
We need to include io.h and process.h for close() and exit(), as unistd.h may
not be universally available.
2021-05-04 12:12:50 +08:00
Matthias Clasen
ead06fdb35
Bump version to 4.3.0
...
We are going to add new API.
Fix up affected tests.
2021-05-02 21:01:56 -04:00
Matthias Clasen
4c6c0b9099
Add a test for custom serializers
2021-05-02 09:17:20 -04:00
Matthias Clasen
a5cab71c9b
Add tests for content serialization
...
Test that roundtripping various types of content
through a stream of a given mimetype works as
expected.
2021-05-02 00:01:57 -04:00
Timm Bäder
6b6246f7b4
clipboard tests: Add noreturn annotations where possible
...
Clang complains when they are missing.
2021-05-01 17:14:23 +02:00
Matthias Clasen
c1b614772c
Install the clipboard-client binary
...
It is needed for the installed test.
2021-04-30 09:59:58 -04:00
Matthias Clasen
5636384449
Skip clipboard tests when they don't work
...
On headless weston, we have no seat, so focusing
the window won't work, and thus claiming the clipboard
won't either. Skip the tests in that case.
2021-04-30 09:17:39 -04:00
Matthias Clasen
f72ca060b5
Run gdk tests with an unset D-Bus address
...
If the session bus address is unset, GLib will
helpfully try to autolaunch a bus, which will
fail and timeout. If we set an empty address,
it gives up early.
2021-04-30 08:10:48 -04:00
Matthias Clasen
6482954c6e
Fix the clipboard test under X11
...
We don't have a signal handler to worry about here.
2021-04-30 08:02:35 -04:00
Matthias Clasen
e1a0e4bfbe
Make clipboard tests run installed
...
Use dedicated data files, and install them.
As usual, to run the test binary by hand, you
will need to set G_TEST_SRCDIR.
2021-04-30 07:47:19 -04:00
Matthias Clasen
be42644091
Add more clipboard tests
...
This tests the simple cases of copying text,
files, colors or images between processes.
2021-04-30 06:48:52 -04:00
Matthias Clasen
f98353c20b
Force g_test_init to cooperate
...
Change all g_test_init calls in the testsuite
to avoid the macro, so they work regardless of
G_DISABLE_ASSERT.
2021-04-12 21:22:46 -04:00
Matthias Clasen
8c156e6b80
testsuite: Reduce the use of g_assert
...
Stop using g_assert() in the gtk tests.
2021-04-12 21:22:46 -04:00
Matthias Clasen
4d1075a082
testsuite: Reduce the use of g_assert
...
Stop using g_assert() in the gsk tests.
2021-04-12 21:22:46 -04:00
Matthias Clasen
f9fa92766b
testsuite: Reduce use of g_assert
...
Stop using g_assert() in the css tests.
2021-04-12 08:33:41 -04:00
Matthias Clasen
90d187894d
testsuite: Reduce use of g_assert
...
Stop using g_assert() in the reftests.
2021-04-12 08:30:56 -04:00
Matthias Clasen
03db2690e2
testsuite: Reduce use of g_assert
...
Stop using g_assert() in the gdk tests.
2021-04-12 08:18:00 -04:00
Matthias Clasen
efb5e793a4
nodeparser: Change the serialization
...
Arrange things so that non-child parameters
are always printed before the children. This
greatly helps with readability, which really
suffers when there's hundreds of lines of indented
children between the node start and its parameters.
Update all affected tests.
2021-04-02 20:38:32 -04:00
Matthias Clasen
f2edf40e48
node test: Improve --generate
...
This is a pet peeve of mine: When we call
g_test_init() before handling --generate,
the random seed spew pollutes the output.
Highly annoying. I've fixes many test binaries
over the years, but more keep popping up.
2021-04-02 20:35:39 -04:00
Matthias Clasen
5cb5bdc4eb
testsuite: Sort gsk compare tests
...
Easier to find things that way.
2021-04-01 20:07:13 -04:00
Matthias Clasen
08913deba5
Add some more gsk tests
...
The css-background test contains a node pattern that
is optimized in the ngl renderer.
2021-04-01 20:06:40 -04:00
Matthias Clasen
aceeef47f4
Add one more compose test
2021-04-01 20:06:40 -04:00
Matthias Clasen
7f4522a3f1
Add more compose tests
...
Test the sequences whose demise made people
unhappy.
2021-04-01 15:32:32 -04:00
Matthias Clasen
b5df1299ec
gsk: Add another test
...
Compare clipped repeat nodes. Must skip cairo here
since it blurred the child by scaling after rendering.
Also skip the gl renderer, since it hasn't been fixed
for this yet. ngl passes this test.
2021-03-31 16:49:31 -04:00
Matthias Clasen
6f62107656
testsuite: Rename next to ngl
...
Use specific names for renderers in the gsk tests.
Otherwise the tests may use the wrong renderer, or
the same renderer twice.
2021-03-31 14:59:43 -04:00
Matthias Clasen
68d634b31c
Disable the border-image-url reftest
...
It seems to make assumptions about text positioning that
are not holding with subpixel positioning. I'm not 100%
sure how that leads to exactly the artifacts that are seen
here, but I am just disabling the test until that is fully
understood.
2021-03-30 11:00:54 -04:00
Matthias Clasen
d1c66f75e3
Disable flaky focus tests
2021-03-30 11:00:54 -04:00
Matthias Clasen
eba9cd8775
Disable the label-background reftest
...
It makes assumptions about text positioning that are
not holding with subpixel positioning. There is no
guarantee that the next word in a multi-word text
starts on an even pixel boundary, as it does when
you break the text into multiple, separately rendered
blocks.
2021-03-30 11:00:54 -04:00
Matthias Clasen
9606945ed8
Fix tests for new version
2021-03-30 11:00:54 -04:00
Matthias Clasen
146069058f
Add some tests for node diffing
...
Nothing deep yet, but more can be added.
2021-03-28 10:45:40 -04:00
Matthias Clasen
db126a19b6
Plug a test memleak
2021-03-27 21:52:49 -04:00