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 791289 - Add an automated test
Add an automated test
Status: RESOLVED FIXED
Product: libgweather
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: future
Assigned To: libgweather-maint
libgweather-maint
Depends on:
Blocks:
 
 
Reported: 2017-12-06 00:46 UTC by Bastien Nocera
Modified: 2017-12-06 19:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GWeatherLocation: Add API to create world from specific path (4.61 KB, patch)
2017-12-06 00:46 UTC, Bastien Nocera
committed Details | Review
tests: Add test for named-timezones codes (3.68 KB, patch)
2017-12-06 00:46 UTC, Bastien Nocera
none Details | Review
tests: Add test for named-timezones codes (3.63 KB, patch)
2017-12-06 12:29 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2017-12-06 00:46:25 UTC
As discussed in bug 791066
Comment 1 Bastien Nocera 2017-12-06 00:46:42 UTC
Created attachment 365077 [details] [review]
GWeatherLocation: Add API to create world from specific path

This will be used to run tests from the uninstalled Locations.xml file.

Note that this also removes a guard from gweather_location_unref() so
that the created world can be destroyed (muhahaha).
Comment 2 Bastien Nocera 2017-12-06 00:46:48 UTC
Created attachment 365078 [details] [review]
tests: Add test for named-timezones codes

This is the first automated test for libgweather, so it is named
generically to be extended.
Comment 3 Giovanni Campagna 2017-12-06 05:55:12 UTC
Review of attachment 365077 [details] [review]:

Looks good.
Comment 4 Giovanni Campagna 2017-12-06 05:56:01 UTC
Review of attachment 365078 [details] [review]:

::: libgweather/test_libgweather.c
@@ +1,2 @@
+/* Small test app for disc concent detection
+ * (c) 2004 Ronald Bultje <rbultje@ronald.bitfreak.net>

???
Comment 5 Bastien Nocera 2017-12-06 12:29:23 UTC
Created attachment 365103 [details] [review]
tests: Add test for named-timezones codes

This is the first automated test for libgweather, so it is named
generically to be extended.
Comment 6 Bastien Nocera 2017-12-06 12:30:07 UTC
Attachment 365077 [details] pushed as ad604b7 - GWeatherLocation: Add API to create world from specific path
Attachment 365103 [details] pushed as 2373f56 - tests: Add test for named-timezones codes
Comment 7 Bastien Nocera 2017-12-06 19:08:08 UTC
(In reply to Bastien Nocera from comment #1)
> Created attachment 365077 [details] [review] [review]
> GWeatherLocation: Add API to create world from specific path
> 
> This will be used to run tests from the uninstalled Locations.xml file.
> 
> Note that this also removes a guard from gweather_location_unref() so
> that the created world can be destroyed (muhahaha).

I actually don't like this, as we have a bunch of difficult to work-around uses of gweather_location_get_world(), in gweather-location-entry.c, gweather-timezone-menu.c and gweather-timezone.c

I'll file a new bug about using an envvar instead.