Simon McVittie
0f125aad90
tests: Accept slightly different numeric results
...
FLT_EPSILON is the distance between 1.0 and the next distinct floating
point number, and doesn't necessarily have anything to do with the
precision we can expect from a series of floating-point calculations.
Experimentally, 1e-6 is achievable, even on platforms with unusual
floating point implementations like i387.
Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/6051
Bug-Debian: https://bugs.debian.org/1050076
Signed-off-by: Simon McVittie <smcv@debian.org>
2023-08-22 17:24:17 +01:00
G.Willems
b4977decc1
gtktexthistory: restore 'modified' flag on redo
...
When redoing a history entry, its `is_modified` flag is not
reflected to the history state tracker. So GtkTextBuffers may
expose a modified=FALSE status, despite a change was actually
applied to the buffer.
For the undo case, an `is_modified_set` flag was set on the last
entry of the undo queue when a change of the modified state of
the history is requested. This commit does the same on the first
entry of the redo queue.
Closes #5777
2023-08-17 22:26:00 +02:00
Matthias Clasen
87430be658
Fix up a testcase
...
I had gotten the path direction enum mixed up here.
2023-08-14 15:59:45 -04:00
Matthias Clasen
a85ab3585e
Revise gsk_path_point_get_tangent
...
Update the directions enum to allow all four
tangents to be obtained. Add an illustration
to the docs for clarity.
Update all callers.
2023-08-14 14:58:22 -04:00
Matthias Clasen
6ace4b60d8
pathpoint: Revise argument order
...
In order for introspection and documentation to
not be confused, we need to have the GskPathPoint
be the first argument.
Update all callers.
2023-08-14 13:20:34 -04:00
Matthias Clasen
44bc5a139c
Add rounded rects to the tests
2023-08-12 16:09:31 -04:00
Matthias Clasen
83d692e2d3
path: Add tests for gsk_path_builder_add methods
...
Check that they all end the current contour.
Fixes : #6011
2023-08-11 07:24:19 -04:00
Matthias Clasen
421365cfc3
Add more path point tests
2023-08-09 23:55:08 -04:00
Matthias Clasen
59c5b41f3d
Cosmetics
2023-08-09 23:48:50 -04:00
Matthias Clasen
0aa3356499
Add more path fill tests
...
These also used to live with measure tests.
2023-08-09 22:47:13 -04:00
Matthias Clasen
77def95659
Add path fill tests
...
These used to live with the measure tests, but
path_in_fill no longer involves a measure.
2023-08-09 21:50:29 -04:00
Matthias Clasen
2bcc998e90
Add tests for gsk_path_builder_add_segment
...
Test at least some of the special cases:
- start and end point on the same contour
- start and end point on the same segment
- end before start
2023-08-09 07:01:01 -04:00
Jeremy Bícha
4881ef251e
test-calendar: Update timezone name
...
Debian no longer provides the MET timezone
but instead provides geographical region and city name
2023-08-08 15:01:42 -04:00
Matthias Clasen
02a4e5a457
Add compare tests for fill and stroke nodes
2023-08-07 13:02:57 -04:00
Matthias Clasen
a548a91e6d
Add nodeparser tests for fill and stroke nodes
2023-08-07 13:02:57 -04:00
Matthias Clasen
dbcbf0523b
Add tests for GskPathPoint
...
As always, untested code doesn't work...
2023-08-07 08:33:05 -04:00
Matthias Clasen
785b9541f6
gsk: Add tests for GskPath
2023-08-06 21:01:11 -04:00
Matthias Clasen
a4cbabb80f
gsk: Add tests for GskCurve
2023-08-06 20:48:09 -04:00
Matthias Clasen
ba41edf531
gsk: Add tests for GskBoundingBox
2023-08-06 17:16:46 -04:00
Matthias Clasen
d241ec4f3e
Update tests
2023-08-05 15:02:00 -04:00
Matthias Clasen
fef69881a7
4.12.0
2023-08-05 00:01:26 -04:00
Matthias Clasen
d05628c66a
testsuite: Don't rely on default visibility
...
The builder test was relying on default visiblity
for non-static functions. Make it explicit that we
want to export these functions, so the test keeps
working when we change the default visibility.
2023-08-04 06:15:13 -04:00
Matthias Clasen
ea72e7e5b3
reftests: Fix one reftest
...
The xalign property of GtkLabel defaults to 0.5,
meaning that the contents will be centered, which
is not what GtkInscription does.
2023-08-02 16:32:40 +01:00
Matthias Clasen
7a8a27bd60
ci: Mark the clipboard test as flaky
...
Lets give up on trying to run this successfully
in ci. More green in more places!
2023-07-28 09:06:14 +03:00
Patrick Griffis
59941930f7
build: Fix building with introspection disabled and testsuite enabled
...
The headless tests are written in Python and need g-i.
2023-07-23 19:30:30 -05:00
Benjamin Otte
4a8122f685
gdk: Make A8 and A16 formats premultiplied
...
The relevant question here is about details, because we have to choose
if we declare alpha-only formats as having their (nonexistant) color
channels premultiplied or not, so that the code paths using them can do
the right thing.
Because we are premultiplied by default, it makes sense to treat alpha
like that, because then the alpha-only code doesn't need to do
workarounds for straight alpha.
Where this is relevant of course is when expanding the alpha channel
into color channels, where we want to end up with white.
So make sure we do color = alpha there instead of color = 1 like we did
before.
2023-07-22 01:33:44 +02:00
Benjamin Otte
27fbdcbecb
gdk: Add A16_FLOAT and A32_FLOAT formats
...
We need them for mask-only textures.
For tiffs, we convert the formats to RGBA (the idea that tiff can save
everything needs to be buried I guess) as tiffs can't do alpha-only.
2023-07-22 01:33:44 +02:00
Matthias Clasen
7fb6c04e99
Make the new compose table test work
...
This just copies what we do already for other
tests that check parser failures.
2023-07-20 11:48:13 -04:00
Luca Bacci
31727a4ec5
Add test for large compose file
...
See #4990
2023-07-19 17:49:05 +02:00
Benjamin Otte
c179013790
testsuite: Add a test for mask out of bounds effects
...
Inverted alpha masks have an effect on the source, even if the mask
doesn't cover the source at all - or worse, is completely clipped out.
The GL renderer handles this fine, but Cairo and Vulkan had
optimizations that got this wrong.
2023-07-03 22:02:44 +02:00
Benjamin Otte
c6eb7fd483
gsk: Fix luminance in Cairo and GL renderer
...
In particular, fix the combination of luminance and alpha. We want to do
mask = luminance * alpha
and for inverted
mask = (1.0 - luminance) * alpha
so add a test that makes sure we do that and then fix the code and
existing tests to conform to it.
2023-07-03 22:02:44 +02:00
Barnabás Pőcze
81e9de3778
a11y: Fix some GtkATContext reference leaks
...
`gtk_accessible_get_at_context()` is transfer-full, so the returned
reference needs to be dropped. This was missing in a couple places.
2023-07-01 16:40:11 +02:00
Matthias Clasen
e57eaf16b4
Merge branch 'wip/chergert/map-as-sectionmodel' into 'main'
...
maplistmodel: implement GtkSectionModel
See merge request GNOME/gtk!6154
2023-06-30 01:50:07 +00:00
Matthias Clasen
9aabb0e98d
Add section model tests for GtkMapListModel
2023-06-29 21:30:11 -04:00
Matthias Clasen
2217509701
Plug a memory leak in gsk tests
...
Pointed out by asan.
2023-06-27 21:48:12 -04:00
Matthias Clasen
76fcd5cf25
Add another a11y test
...
This one catches the lingering 'widget' role
that only happens when widgets are realized
and rooted.
2023-06-21 19:55:46 -04:00
Matthias Clasen
510bf86268
Add another a11y test
...
Test that roles come out right for custom widgets.
2023-06-21 14:24:52 -04:00
Matthias Clasen
cca6a66518
a11y: Fix tests
...
The change to make hidden follow mappedness
means that we now need to arrange for our
test cases to be mapped.
2023-06-20 12:33:02 -04:00
Matthias Clasen
891462e5af
Add some more a11y tests
...
Check that the hidden state is as it should be.
2023-06-20 11:05:22 -04:00
Matthias Clasen
c2d6f900d9
window: Use application as accessible role
...
ARIA deems the window role to be abstract,
so lets use the application role instead.
Update affected tests.
2023-06-19 18:38:58 -04:00
Matthias Clasen
b84650c2a3
Add another a11y test
2023-06-19 18:30:41 -04:00
Matthias Clasen
93aff8a129
Add more name computation tests
...
Test the fallback for range values.
This was not working at all before
the previous commit.
2023-06-19 12:40:33 -04:00
Matthias Clasen
663e3d0811
Add tests for accessible name computation
2023-06-19 12:38:51 -04:00
Matthias Clasen
7df9cc1b47
label: Stop overriding accessible label
...
There's no need to, the accessible name computation
picks the content up where it is allowed (and not
overridden by explicit attributes).
2023-06-19 12:38:51 -04:00
Benjamin Otte
49c2366121
testsuite: Unify skipping memorytexture test
...
... and make it handle more cases of failure, in particular OpenGL and
Vulkan being unsupported by the system.
2023-06-19 15:08:00 +02:00
Benjamin Otte
ae89f6e6c0
testsuite: Add a vulkan method to memorytexure test
...
This uses the newly added NULL-surface renderer.
2023-06-19 14:13:03 +02:00
Matthias Clasen
32550fd6fc
a11y: Remove an overzealous optimisation
...
The result of calling update_property needs
to be that the property is marked as set
afterward, even if the value we pass happens
to match the default value.
After this change, scrollbars have value-now
show up as zero in the accessiblity page of
the inspector, even when that matches the lower
bound.
Test included.
Fixes : #5886
2023-06-19 07:22:32 -04:00
Matthias Clasen
c2735f98b4
testsuite: Add some more a11y tests
...
Test that overriding roles works, both
via g_object_new, and via ui files.
2023-06-17 22:00:55 -04:00
Matthias Clasen
9d79982677
Merge branch 'fontchooser-a11y' into 'main'
...
button: Improve accessible setup
See merge request GNOME/gtk!6081
2023-06-10 20:29:45 +00:00
Benjamin Otte
3681144768
Merge branch 'wip/otte/for-main' into 'main'
...
testsuite: Add another test to the listitemmanager
See merge request GNOME/gtk!6083
2023-06-10 18:51:05 +00:00
Benjamin Otte
f06cfa2967
testsuite: Print update after changes, not before
...
This way, we don't do an empty print at the start and don't miss a print
at the end.
2023-06-10 20:25:20 +02:00
Benjamin Otte
2cbee7cf86
testsuite: Check that removing listitem trackers works properly
...
We remove them at the end, so just to be sure, check again.
(Guess if I added this check because removing failed.)
2023-06-10 20:25:20 +02:00
Benjamin Otte
f5cdd6fa32
testsuite: Add another test to the listitemmanager
...
Ensure the itemmanager doesn't lose any widgets by ensuring that the
tiles with widgets do account for all children of the list widget.
2023-06-10 20:25:20 +02:00
Matthias Clasen
cf30a4f304
button: Improve accessible setup
...
With the current approach, we get duplicate labels
in the accessible name: _Cancel Cancel. Change things
around to always set the labelled-by accessible relation
if we have a label, and not the label accessible property.
2023-06-10 11:29:12 -04:00
Matthias Clasen
b69bfe3799
testsuite: More memleak fixes
2023-06-09 23:23:32 -04:00
Matthias Clasen
b439398d09
testsuite: Plug some memory leaks
2023-06-09 22:40:38 -04:00
Benjamin Otte
53bebd2ed1
testsuite: Set GIO_USE_VFS=local everywhere
...
And do so centrally, not randomly in individual tests.
(Hopefully) fixes spurious test failures in CI.
Related: #5867
2023-06-09 02:29:24 +02:00
Benjamin Otte
ca9f0abdd8
Merge branch 'wip/otte/for-main' into 'main'
...
testsuite: Make memorytexture tests random
See merge request GNOME/gtk!6075
2023-06-08 23:54:07 +00:00
Benjamin Otte
f033b6c2c6
testsuite: Don't always loop in memorytexture tests
...
When running the tests, only run the random (and potentially large) size
download test once instead of 10 times.
There's no real benefit in doing that, both because it's unlikely to
fail only in the 2nd or 9th run and because the sizes are picked
randomly.
This also speeds up the test massively as the download test was
dominating the runtime.
2023-06-09 01:12:32 +02:00
Benjamin Otte
45656ba426
testsuite: Make memorytexture tests random
...
Instead of picking a few numbers in advance and running them through the
test gauntlet every time, pick the random numbers at runtime.
This both increases the test coverage in that it ultimately tests more
combinations across many runs and it reduces the runtime of individual
runs because every tun only runs the download tests twice (with 1px and
the random size) instead of 5 times.
And that speedup benefits the CI, where the asan runs would cause this
test to timeout sometimes.
2023-06-09 01:12:32 +02:00
Benjamin Otte
0a0f0d9e7e
testsuite: Add a test for repeating gradients
...
Make sure scaling the image also scales the color stop lookup.
2023-06-08 22:16:18 +02:00
Matthias Clasen
baaa748248
ci: Disable headless tests under asan
...
Our use of LD_PRELOAD for these tests does not
sit right with asan, so just skip them in this
case.
2023-06-05 21:15:31 -04:00
Benjamin Otte
9070c457d6
testsuite: Make clipped-repeat test work universally
...
Cover the rounded corners so that they cause no visible difference in
the end result.
2023-06-05 05:33:07 +02:00
Benjamin Otte
8c5e046574
testsuite: Adapt color-matrix testcase
...
Make it use an alpha value that is well defined, ie 0.4 instead of 0.5.
0.4 * 255 = 102
0.5 * 255 = 127.5
This avoids rounding issues where some math may cause the resulting
alpha value to be 127, and some other math ends up with 128.
2023-06-05 05:33:07 +02:00
Benjamin Otte
8860a2a688
testsuite: fix memleak
...
Also use the actual diff command we found instead of searching for it
again.
2023-06-05 05:33:07 +02:00
Benjamin Otte
fd5d15004e
Merge branch 'wip/otte/vulkan' into 'main'
...
Vulkan hacking going overboard
See merge request GNOME/gtk!5992
2023-06-04 18:21:21 +00:00
Benjamin Otte
968ceb71d5
gsk: Add (private) gsk_rounded_rect_intersection()
...
The idea is that for a rectangle intersection, each corner of the
result is either entirely part of one original rectangle or it is
an intersection point.
By detecting those 2 cases and treating them differently, we can
simplify the code to compare rounded rectangles.
2023-06-04 19:42:01 +02:00
Benjamin Otte
d8b9c3ae96
vulkan: Track offset in the renderpass
...
This avoids emitting lots of push constant updates as most of the
transforms we have are simple translations to adjust drawing for the
next widget.
2023-06-04 19:42:01 +02:00
Benjamin Otte
7f1bd1f047
vulkan: Handle empty child bounds in repeat node
...
Also add test to the testsuite for it.
2023-06-04 19:42:01 +02:00
Matthias Clasen
d427933c61
testsuite: Improve test coverage
2023-06-04 09:04:25 -04:00
Matthias Clasen
38bf843de8
Merge branch 'wip/alice/muxer-fix' into 'main'
...
actionmuxer: Correctly notify actions after reparenting
Closes #5861
See merge request GNOME/gtk!6043
2023-06-01 10:54:33 +00:00
Alice Mikhaylenko
1549ec5f9b
actionmuxer: Correctly notify actions after reparenting
...
When registering an observer, we send a notification and for that we need
to query the action's state and param type. When setting up a muxer parent,
same thing happens, except the action is queried on the parent instead.
This means that the muxer will notify observers about the parent's actions,
but not about its own.
Add a test to verify it works.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5861
2023-06-01 06:39:44 +04:00
Matthias Clasen
96f6787a3e
testsuite: Add more download tests
...
Add some odd-sized texture sizes to the
download tests, to trigger alignment issues
in the various upload code paths. And add
a size that is bigger than the max-texture-size
we force in one of our test setups.
To compensate, reduce the number of
runs per size from 20 to 10.
2023-05-30 23:01:20 -04:00
Matthias Clasen
cc665f29ea
testsuite: Plug a memory leak
2023-05-30 22:37:03 -04:00
Matthias Clasen
8d2047c824
testsuite: Use proper alignment when uploading to GL
2023-05-30 22:36:41 -04:00
Matthias Clasen
a79da8b655
Improve test coverage for GdkGLTexture
2023-05-30 22:36:10 -04:00
Matthias Clasen
876b439d4a
Merge branch 'matthiasc/conversion-tests' into 'main'
...
Texture format work
See merge request GNOME/gtk!6035
2023-05-31 00:13:51 +00:00
Matthias Clasen
2bf2635635
testsuite: Exclude some formats on GLES
...
GLES < 3.2 has some problems with 16-bit formats,
so exclude these from our download tests.
2023-05-30 19:46:13 -04:00
Matthias Clasen
67ed09f5ae
testsuite: Add tests for native GL textures
...
Create GL textures in gray and GA formats
and check that we can download from them
successfully.
2023-05-30 19:46:13 -04:00
Sophie Herold
d141ac5adf
gdk: Add gray/alpha memory formats to testsuite
2023-05-30 14:41:01 -04:00
Sophie Herold
50115d70c6
gdk: Add grayscale and alpha memory formats
2023-05-30 14:41:01 -04:00
Benjamin Otte
3dc3d03a08
testsuite: Add conversion tests
...
Ensure we can convert from any format to any other format.
2023-05-30 00:42:10 +02:00
Benjamin Otte
788bd575d6
testsuite: Disable certain texture download tests
...
The GL renderers like to premultiply content that isn't, and due to the
data loss with alpha == 0 (transparent white, transparent black and
transparent anything are all represented by (0, 0, 0, 0) when
premultiplied) these values cannot be converted back.
2023-05-30 00:42:10 +02:00
Benjamin Otte
94a2dc4c47
testsuite: Update memorytexture test for TextureDownloader
...
There is no longer a need to use gdk_texture_download() and force
conversion to ARGB8 format. We can download the pixels in the original
format again.
That way we avoid testing the conversion code and avoid having to deal
with differences in representable colors.
However, some formats do do conversions, so we allow pixel comparisons
to be accurate (requires 16bit comparison accuracy) or inaccurate (we
only care about 8bit).
Note that for the default RGBA formats, this is identical and means they
need to be bit-exact the same, no matter what.
But the higher bit depth formats may be more different - floating point
can even have different values with high accuracy (the float mantissa is
23 bit, we only care about 16).
2023-05-30 00:42:10 +02:00
Benjamin Otte
169a7f83e6
testsuite: Imitate gdk_memory_convert() correctly
...
The formula use to compute pixel values from GdkRGBA floats was slightly
adapted some time ago, copy that adaptation
2023-05-30 00:39:46 +02:00
Luca Bacci
703494c7fa
testsuite: rename 'wait' function to 'timed_loop'
...
When compiling for macOS, CLang errors out because a non-static
wait function is declared in sys/wait.h.
2023-05-29 16:43:28 +02:00
Matthias Clasen
f10c234361
css: Add a test for non-ASCII font family
...
This came up in #5852 , so make sure that it works.
2023-05-28 07:57:40 -04:00
Matthias Clasen
5c1c22156c
sortlistmodel: Optimize signals
...
When we emit items-changed due to a section
sorter change, don't also emit sections-changed.
Instead make the items-changed signal cover the
whole range.
Tests included.
2023-05-27 20:37:28 -04:00
Matthias Clasen
9c1049e710
multiselection: Pass through sections-changed
...
If our underlying model emits sections-changed,
we need to pass it on.
Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
a1352a88ff
singleselection: Pass through sections-changed
...
If our underlying model emits sections-changed,
we need to pass it on.
Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
8825917140
noselection: Pass through sections-changed
...
If our underlying model emits sections-changed,
we need to pass it on.
Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
ba8d4902b5
filterlistmodel: Pass through sections-changed
...
If our underlying model emits sections-changed,
we need to pass it on.
Add a test for this too.
2023-05-27 17:27:19 -04:00
Matthias Clasen
8f3d3ca587
slicelistmodel: Pass through sections
...
Implement GtkSectionModel in the obvious way.
Tests included.
2023-05-27 17:27:19 -04:00
Matthias Clasen
aeba1e08e8
sortlistmodel: Emit sections-changed
...
When a new section sorter is set, potentially
all sections have changed. So emit sections-changed
for all items.
Tests included.
2023-05-27 17:27:19 -04:00
Matthias Clasen
fc524ed346
Cosmetics
...
Fix copy-paste errors in line 1.
2023-05-27 13:51:39 -04:00
Matthias Clasen
56cfef3544
testsuite: Use gtk_list_item_manager_gc_tiles
...
Use this new api instead of open-coding it.
Also, assert that it merges consecutive
multi-item tiles.
2023-05-20 19:50:11 -04:00
Matthias Clasen
1d4f383ba5
Drop the FILLER tile type
...
It is not used anymore.
2023-05-20 12:28:19 -04:00
Matthias Clasen
43a22bb350
Cosmetics
...
Use the proper g_assert variant.
2023-05-20 07:39:21 -04:00
Matthias Clasen
70ba00ae53
testsuite: Make this test compile
...
clang did not like this creative use of
strings at all. Rightfully so.
2023-05-18 08:40:50 -04:00
Matthias Clasen
188677724c
Improve test coverage for property lookup models
2023-05-16 20:13:57 -04:00
Matthias Clasen
9d3046f187
Merge branch 'matthiasc/for-main' into 'main'
...
Matthiasc/for main
See merge request GNOME/gtk!5975
2023-05-16 20:42:27 +00:00
Benjamin Otte
2b0e3a5b1a
nodeparser: Move an error check
...
By putting the check earlier, it will be emitted for the right token.
2023-05-16 18:53:53 +02:00
Benjamin Otte
f5955feea1
testsuite: Add crossfade-clip-both-children test
...
This one tests a crossfade between two non-overlapping nodes with a clip
region that covers neither of the two nodes.
This tests that renderers can deal with clip regions that doesn't
overlap nodes in a situation where they will most likely want to create
an offscreen.
As offscreens are typically clipped to the clip region, this would cause
an empty offscreen and that can cause failures.
2023-05-16 18:53:27 +02:00
Benjamin Otte
853e8719c6
testsuite: Add clip-translate-offscreen test
...
This was an experiment where an offscreen was translated inside an
existing clip.
Because renderers try to limit offscreens to the clip rect, this is
interesting, because they might get the translation wrong.
2023-05-16 18:53:27 +02:00
Benjamin Otte
ee6ef41e71
css: Remove crashy resource:// optimization
...
Using gdk_texture_new_from_resource() is not valid here because we are
not sure if the given resource is valid.
Plus, the previous optimization is no longer relevant, because we are
not using gdk_pixbuf_new_from_resource() anymore - which was what this
optimization was about before it was ported to GdkTexture.
Test attached.
2023-05-16 18:53:27 +02:00
Benjamin Otte
fde3d2cd50
testsuite: Add testcase for z clipping
...
the near and far clipping plane are at -10000 and 10000 respectively.
Test that the renderers respect that.
2023-05-16 18:53:27 +02:00
Matthias Clasen
3e27232028
Improve test coverage for sorters
2023-05-16 12:33:12 -04:00
Matthias Clasen
c2676ad785
Improve test coverage for GtkPropertyLookupListModel
2023-05-16 12:33:12 -04:00
Matthias Clasen
05a0aca5ab
Improve test coverage for GtkStringSorter
2023-05-15 23:21:06 -04:00
Matthias Clasen
013401b594
Fix texture tests with GLES
...
No sync for you if you're using GLES.
2023-05-15 19:11:35 -04:00
Matthias Clasen
0152286fa0
Improve test coverage for GdkGLContext
2023-05-15 16:49:12 -04:00
Matthias Clasen
41b606b16d
Add tests for GdkTextureDownloader
2023-05-15 15:24:56 -04:00
Matthias Clasen
f83c00c928
Test gltexture update functionality
2023-05-15 12:50:28 -04:00
Matthias Clasen
f497cb2b6e
Improve gdk test coverage
2023-05-15 11:56:31 -04:00
Matthias Clasen
e50209a535
Add more texture load tests
...
Add some tests for handling of failures.
The test data here is taking from gdk-pixbufs
tests/test-images/fail directory, excluding anything
but png, tiff and jpg images.
2023-05-14 07:50:11 -04:00
Matthias Clasen
d6430995ad
Improve gdk test coverage
...
Test the loadable icon implementation of GdkTexture.
2023-05-14 07:50:11 -04:00
Matthias Clasen
cea15fc63e
Improve gdk test coverage
...
Add tests for GdkToplevvelLayout and
GdkPopupLayout.
2023-05-13 21:56:29 -04:00
Matthias Clasen
f2a297f56d
Stop using gtk_css_provider_load_from_data
2023-05-13 19:59:17 -04:00
Matthias Clasen
9a2d6d6d88
Improve css parser test coverage
2023-05-13 07:36:28 -04:00
Matthias Clasen
57dd88ee53
testsuite: Cosmetics
2023-05-12 19:52:42 -04:00
Matthias Clasen
8c92c619de
Test the deprecation support
...
Test gtk4-builder-tool validate --deprecations
2023-05-12 19:52:42 -04:00
Matthias Clasen
78d2002965
Add tests for gtk4-builder-tool enumerate
2023-05-12 19:52:42 -04:00
Matthias Clasen
25c4acb6d2
Add tests for hsv<>rgb conversion
2023-05-12 19:52:42 -04:00
Matthias Clasen
0a3dac10c6
Improve test coverage for the css parser
2023-05-12 19:52:42 -04:00
Matthias Clasen
c9afcd31c2
css: Improve transition test coverage
2023-05-12 19:52:42 -04:00
Matthias Clasen
09bab2b2df
Improve css parser test coverage
2023-05-12 08:38:39 -04:00
Matthias Clasen
a3ebc0329d
Improve test coverage for list models
2023-05-11 23:24:23 -04:00
Matthias Clasen
ba64e5588d
Add a little wait to focus tests
...
I don't know exactly why, but this seems
to help the tests not fail on X11.
2023-05-11 22:24:10 -04:00
Matthias Clasen
fb2e67638d
testsuite: Simplify shader test
...
Simplify the shader to something GLES
will successfully compile.
2023-05-11 09:20:25 -04:00
Matthias Clasen
13ca3187f2
testsuite: fix another surface unref warning
2023-05-11 06:40:57 -04:00
Matthias Clasen
dc3003bc4d
gsk: Improve test coverage
...
Add more tests for gsk transforms, render node
and renderer apis.
2023-05-10 20:21:31 -04:00
Matthias Clasen
abbb3a2da6
testsuite: Close displays in the gsk tests
...
This gives us better coverage of the dispose
codepath for a driver that has actually been
used.
2023-05-10 20:21:12 -04:00
Matthias Clasen
9a9257d7be
tests: Don't disable vertex arrays
...
It doesn't work, and that makes tests fail.
2023-05-09 23:02:48 -04:00
Matthias Clasen
5c10f2b4cd
Improve coverage for half-float fallbacks
2023-05-09 23:02:30 -04:00
Matthias Clasen
676cd1e673
tests: Stop copying the tool tests
...
No point in doing that, and the meson feature
we are using here is deprecated.
2023-05-09 21:21:39 -04:00
Matthias Clasen
ef5f34c985
Update tests
2023-05-09 16:36:07 -04:00
Matthias Clasen
91ca6d0851
Merge branch 'wip/ebassi/gen-version-macros' into 'main'
...
Generate version and deprecation macros at build time
See merge request GNOME/gtk!5945
2023-05-09 18:23:40 +00:00
Emmanuele Bassi
cdeeb3275a
build: Internal tests must set GTK_COMPILATION
...
Otherwise they won't be able to use the appropriate function visibility
on Windows.
2023-05-09 19:01:21 +01:00
Matthias Clasen
526ddfa866
Merge branch 'wip/otte/sections' into 'main'
...
Add GtkSectionModel
See merge request GNOME/gtk!5818
2023-05-09 16:36:55 +00:00
Emmanuele Bassi
265bc90524
build: Use Meson's gnu_symbol_visibility
...
Instead of injecting `-fvisibility=hidden` depending on a compiler check
ourselves, let Meson do it for us.
This also avoids us having to filter `-fvisibility=hidden` when reusing
the common compiler flags.
2023-05-09 16:43:25 +01:00
Benjamin Otte
46adfbef4f
listitemmanager: Create header items for sections
...
Now, finally, listitemmanager has all the necessary support to make
section headers work.
2023-05-09 17:00:40 +02:00
Benjamin Otte
38844fef4d
listitemmanager: Add GtkListHeaderBase and vfuncs
...
This is plumbing for section handling.
The vfuncs don't do anything, this is just the infrastructure.
2023-05-09 17:00:40 +02:00
Benjamin Otte
0ff88346cd
listitemmanager: Make sections configurable
...
Add a gtk_list_item_manager_set_has_sections() (default: FALSE) that
requires explicit turning on for the listitemmanager to gain section
support.
2023-05-09 17:00:40 +02:00
Benjamin Otte
5d2605a151
testsuite: assert widgets are in matched sections
...
All widgets that we display should have their sections known, so assert
that that is the case.
2023-05-09 17:00:40 +02:00
Benjamin Otte
40a7ec73a9
testsuite: Add a print function for the listitemmanager
...
This is very useful when debugging.
2023-05-09 17:00:40 +02:00
Benjamin Otte
6df8eafc3a
testsuite: Add verbose output to listitemmanager test
2023-05-09 17:00:39 +02:00
Benjamin Otte
e680abc723
listitemmanager: Add section tiles
...
For now, we just have a HEADER at the start and a FOOTER at the end.
That's hard enough to get right.
2023-05-09 17:00:39 +02:00
Benjamin Otte
cecaede610
testsuite: Improve listitemmanager test
...
It now has trackers!
2023-05-09 17:00:39 +02:00
Benjamin Otte
7856c52882
testsuite: Add tests for sections to filterlistmodel
2023-05-09 17:00:39 +02:00
Matthias Clasen
568023e6e6
Add a test for filterlistmodel sections
2023-05-09 17:00:39 +02:00
Benjamin Otte
41faddea40
testsuite: Add section tests to sortlistmodel test
2023-05-09 17:00:39 +02:00
Matthias Clasen
a09146df5a
Add a test for sortlistmodel sections
2023-05-09 17:00:39 +02:00
Benjamin Otte
d24291db98
testsuite: Add a listitemmanager test
2023-05-09 17:00:39 +02:00
Matthias Clasen
661022f2eb
Merge branch 'reftest-msvc' into 'main'
...
reftest-snapshot.c: Fix running reftests on Visual Studio
See merge request GNOME/gtk!5937
2023-05-09 14:48:18 +00:00
Matthias Clasen
58a5de6f5d
testsuite: Handle duplicate enum values
...
Our notify tests would fall over if there was
a duplicate enum value (within the first 10 values).
Make it handle that, by skipping the duplicate value.
2023-05-08 07:00:34 -04:00
Chun-wei Fan
a9ca72695f
reftest-snapshot.c: Fix running reftests on Visual Studio
...
On Visual Studio-like builds, shove a ".dll" suffix for the reftest
module so that we look for the correct DLL when running the tests.
2023-05-08 15:10:17 +08:00
Matthias Clasen
8495e0e412
Add a test for quick key events
2023-05-06 09:09:13 -04:00
Matthias Clasen
c9b0ca0de7
ci: Improve headless test logging
2023-05-06 09:02:25 -04:00
Matthias Clasen
8ad1189b0b
ci: Bump timeouts for headless tests
2023-05-05 16:21:54 -04:00
Matthias Clasen
e56a539363
Add a masked variation to gsk tests
...
This improves test coverage for mask nodes.
2023-05-05 15:05:08 -04:00
Matthias Clasen
93ccf08c81
ci: Bump timeouts of headless tests
2023-05-05 12:05:10 -04:00
Matthias Clasen
852f46df19
Remove a no longer building test
2023-05-04 20:53:15 -04:00
Matthias Clasen
5e8e4130a5
Skip another failing gsk test with small textures
2023-05-04 15:36:57 -04:00
Matthias Clasen
f81aa14d93
Merge wayland_smalltexture and wayland_gles
...
We don't really need to have two full separate
test runs for these conditions, so combine them
into one test setup.
2023-05-04 15:13:09 -04:00
Matthias Clasen
ac0311b621
ci: Mark headless monitor test as working
2023-05-04 11:39:35 -04:00
Matthias Clasen
d288931b45
More debug spew
...
Lets see what MUTTER_DEBUG=screen-cast says.
2023-05-04 11:38:55 -04:00
Matthias Clasen
03adeecfa3
Add generous waits
...
These tests work in the smae container locally.
Perhaps this is down to timing?
2023-05-04 11:38:55 -04:00
Matthias Clasen
f98d1a6474
Mark the headless monitor test as failing
...
This is failing because I can't figure out
how to make wireplumber and pipewire work
in ci enough to let me add a new monitor :(
As usual, the test works fine locally.
2023-05-03 23:53:14 -04:00
Matthias Clasen
57e6aae80a
Try to fix dnd tests
2023-05-03 23:27:09 -04:00
Matthias Clasen
f23eaafc85
Typo fix
2023-05-03 23:27:09 -04:00
Matthias Clasen
926b26e9fc
headless tests: Add debug spew
...
Trying to track down what is going on with our
missing monitors.
2023-05-03 23:27:09 -04:00
Matthias Clasen
88f27c423c
ci: Launch pipewire and wireplumber
...
The headless tests require pipewire and wireplumber
for screencast sessions to work. So launch them.
2023-05-03 23:27:09 -04:00
Matthias Clasen
30342896d0
Use python3
...
No /usr/bin/python in our CI image :(
2023-05-03 23:27:09 -04:00
Matthias Clasen
be8e203edc
Make the headless input tests work
...
These needed some updates and workarounds.
They are now part of the testsuite and can
be run like this:
meson test -Cbuild --suite headless
2023-05-03 23:27:09 -04:00
Matthias Clasen
b85a137a68
Fix scan-build warning
2023-05-03 15:32:19 -04:00
Matthias Clasen
a235b59089
Skip some tests with small textures
...
When textures are too large, we will scale them down
to fit the max texture size, which will cause comparisons
to fail.
2023-05-01 16:29:45 -04:00
Matthias Clasen
33ab588d4e
Improve test coverage
...
Check that our two rounded rect intersection functions agree.
2023-05-01 13:58:42 -04:00
Matthias Clasen
7200a93a88
gsk: Give up on one test
...
The rounded-clip-in-clip-3d test fails in GL when
flipped. Given that it was already excluded from cairo,
and also fails cairo when flipped, give up on it for now.
2023-05-01 13:45:20 -04:00
Matthias Clasen
e453a989df
Improve rounded rect intersection
...
Move the rounded rect/rect intersection code to
gskroundedrect.c, make it more precise, and add
tests for it.
Update the callers in the GL renderer.
2023-05-01 13:45:20 -04:00
Matthias Clasen
f29b24517e
Add a test for rotated blend nodes
2023-05-01 13:45:20 -04:00
Matthias Clasen
f6e47b7eb0
Add a test for rotated cross-fade nodes
...
This one checks that we don't apply the modelview
transform twice with cross-fades.
2023-05-01 13:45:13 -04:00
Matthias Clasen
21df62f428
Add another test
2023-05-01 13:43:33 -04:00
Matthias Clasen
5afd5cfec7
Add another gsk test
2023-05-01 13:43:33 -04:00
Matthias Clasen
406b1e2e03
testsuite: Fix gsk test
...
The repeated tests were not careful enough to produce
the correct reference image to match what the repeat
node does.
With these changes, all cairo tests pass.
2023-05-01 13:43:33 -04:00
Matthias Clasen
f1729affa8
testsuite: Add more gsk tests
...
Add separate suites for running the gsk compare-render
tests with the --flip, --rotate or --repeat options.
A bunch of these fail currently, and need diagnosis.
2023-05-01 13:35:35 -04:00
Matthias Clasen
3b2ba8ed99
Add more gsk tests
...
Add options to the gsk compare-render test for
modifying the node (and do a matching change to
the reference image).
flip: negative scale flipping things horizontally
rotate: 90 degree rotation
repeat: 2x2 grid
2023-05-01 13:35:35 -04:00
Matthias Clasen
386c3ac34f
Add another transform test
...
Test that transforming bounds with negative scales
works as expected.
2023-05-01 13:35:22 -04:00
Matthias Clasen
63b50f48a9
Merge branch 'harmonize-would_drop' into 'main'
...
Harmonize would_drop() replacement for g_log_writer_default_would_drop()
See merge request GNOME/gtk!4935
2023-04-28 22:55:42 +00:00
Benjamin Otte
778979cf0e
testsuite: Use GLTextureBuilder
2023-04-27 06:40:47 +02:00
Benjamin Otte
39583e40ef
testsuite: Allow accessors in interfaces
...
There are a lot of cases where properties are implemented in classes but
the getters for these exist in an interface that class implements.
A common Example is g_list_model_get_n_items() being the getter for
GtkWhateverListModel::n-items.
But also property implementations that don't use override_property()
(usually because they have a different default) are handled by this.
2023-04-20 17:47:54 +02:00
Benjamin Otte
be5f225022
testsuite: Be less verbose in accessor-apis test
...
Only print the tried names when --verbose is passed to the test.
2023-04-20 17:47:54 +02:00
Matthias Clasen
b6fac448d7
Merge branch 'matthiasc/for-main' into 'main'
...
Try harder to fix focus tests
See merge request GNOME/gtk!5842
2023-04-16 20:00:46 +00:00
Matthias Clasen
765f55dfbe
testsuite: Skip focus tests when necessary
...
If our window does not get focus, we can't reliably
test things that depend on widgets being focused.
2023-04-16 20:58:26 +02:00
Matthias Clasen
db6a116d49
Try harder to fix focus tests
...
The focus test now asserts that its window is active.
So we should not run them in parallel with other tests,
since those might steal the focus.
2023-04-16 20:08:03 +02:00
Benjamin Otte
27fd0b907d
testsuite: Fix broken test to not unref surfaces twice
...
The test doesn't hold 2 references, it holds only one.
The reason one unref can cause a leak is that some backends - like X11 -
only destroy the surface once the DestroyNotify event from the X server
has come in.
2023-04-16 19:28:21 +02:00
Matthias Clasen
585fb497c1
testsuite: Actually wait for focus
...
We were failing to properly iterate the main
context here. Oops.
2023-04-16 09:11:24 +02:00
Matthias Clasen
c57e5811f1
tests: Check is-focus instead of has-focus
...
We are not presenting windows here.
2023-04-16 08:50:35 +02:00
Benjamin Otte
b64f7050ba
testsuite: Make GLES testsuite run use GLES 2
...
We want to support GLES 2, so make sure we test that support.
Also force-disable common extensions we don't explicitly check for and
don't want to accidentally use.
2023-04-15 17:55:20 +02:00
Benjamin Otte
41454b63b4
testsuite: Add some more exhaustive testing to listlistmodel
2023-04-15 05:27:47 +02:00
Matthias Clasen
87e16f3ad9
testsuite: Check widget properties better
...
Check that setting a property after resetting
it works. An instance of this was fixed in the
previous commit.
2023-04-10 00:24:57 -04:00