After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756666 - use g_assert_true and g_assert_false in unit tests
use g_assert_true and g_assert_false in unit tests
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-15 20:10 UTC by Christian Hergert
Modified: 2015-10-18 16:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixed boolean tests assertions (5.23 KB, patch)
2015-10-18 10:54 UTC, Ignazio Sgalmuzzo
committed Details | Review

Description Christian Hergert 2015-10-15 20:10:59 UTC
In plenty of places in Builder's unit tests, use use integer comparison for boolean checks. Such as:

 g_assert_cmpint(TRUE, ==, do_something());

We should instead use:

 g_assert_true (do_something ());

This is a good bug for someone wanting to get started contributing to Builder.
Comment 1 Ignazio Sgalmuzzo 2015-10-18 10:54:38 UTC
Created attachment 313614 [details] [review]
Fixed boolean tests assertions
Comment 2 Christian Hergert 2015-10-18 16:17:17 UTC
Thanks so much for doing this!

Attachment 313614 [details] pushed as b6e921e - Fixed boolean tests assertions