Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
gtk
Commits
6e40f4f3
Commit
6e40f4f3
authored
Apr 12, 2021
by
Matthias Clasen
Browse files
Remove assertions in tests
parent
ecfba2d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/testerrors.c
View file @
6e40f4f3
...
...
@@ -34,13 +34,13 @@ test_error_trapping (GdkDisplay *gdk_display)
gdk_x11_display_error_trap_push
(
gdk_display
);
XListProperties
(
d
,
0
,
&
dummy
);
/* round trip */
error
=
gdk_x11_display_error_trap_pop
(
gdk_display
);
g_assert
(
error
==
BadWindow
);
g_assert
_true
(
error
==
BadWindow
);
gdk_x11_display_error_trap_push
(
gdk_display
);
XSetCloseDownMode
(
d
,
12345
);
/* not a round trip */
XSetCloseDownMode
(
d
,
DestroyAll
);
error
=
gdk_x11_display_error_trap_pop
(
gdk_display
);
g_assert
(
error
==
BadValue
);
g_assert
_true
(
error
==
BadValue
);
/* try the same without sync */
gdk_x11_display_error_trap_push
(
gdk_display
);
...
...
@@ -60,17 +60,17 @@ test_error_trapping (GdkDisplay *gdk_display)
gdk_x11_display_error_trap_push
(
gdk_display
);
XSetCloseDownMode
(
d
,
12345
);
error
=
gdk_x11_display_error_trap_pop
(
gdk_display
);
g_assert
(
error
==
BadValue
);
g_assert
_true
(
error
==
BadValue
);
error
=
gdk_x11_display_error_trap_pop
(
gdk_display
);
g_assert
(
error
==
Success
);
g_assert
_true
(
error
==
Success
);
gdk_x11_display_error_trap_push
(
gdk_display
);
XSetCloseDownMode
(
d
,
12345
);
gdk_x11_display_error_trap_push
(
gdk_display
);
error
=
gdk_x11_display_error_trap_pop
(
gdk_display
);
g_assert
(
error
==
Success
);
g_assert
_true
(
error
==
Success
);
error
=
gdk_x11_display_error_trap_pop
(
gdk_display
);
g_assert
(
error
==
BadValue
);
g_assert
_true
(
error
==
BadValue
);
/* try nested, without sync */
gdk_x11_display_error_trap_push
(
gdk_display
);
...
...
@@ -104,23 +104,23 @@ test_error_trapping (GdkDisplay *gdk_display)
gdk_x11_display_error_trap_push
(
gdk_display
);
XSync
(
d
,
TRUE
);
/* not an error */
error
=
gdk_x11_display_error_trap_pop
(
gdk_display
);
g_assert
(
error
==
Success
);
g_assert
_true
(
error
==
Success
);
error
=
gdk_x11_display_error_trap_pop
(
gdk_display
);
g_assert
(
error
==
BadValue
);
g_assert
_true
(
error
==
BadValue
);
/* non-roundtrip non-error request after error request, inside trap */
gdk_x11_display_error_trap_push
(
gdk_display
);
XSetCloseDownMode
(
d
,
12345
);
XMapWindow
(
d
,
DefaultRootWindow
(
d
));
error
=
gdk_x11_display_error_trap_pop
(
gdk_display
);
g_assert
(
error
==
BadValue
);
g_assert
_true
(
error
==
BadValue
);
/* a non-roundtrip non-error request before error request, inside trap */
gdk_x11_display_error_trap_push
(
gdk_display
);
XMapWindow
(
d
,
DefaultRootWindow
(
d
));
XSetCloseDownMode
(
d
,
12345
);
error
=
gdk_x11_display_error_trap_pop
(
gdk_display
);
g_assert
(
error
==
BadValue
);
g_assert
_true
(
error
==
BadValue
);
/* Not part of any test, just a double-check
* that all errors have arrived
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment