Commit Graph

2998 Commits

Author SHA1 Message Date
Emmanuele Bassi
9a39b1d705 datetime: Clean up macros and unused variables
The most complex macros should be converted to inlined functions,
instead, to guarantee some type safety.
2010-08-25 12:06:47 +01:00
Emmanuele Bassi
0f87f09397 datetime: Remove the translation marker for a warning message 2010-08-25 00:27:49 +01:00
Thiago Santos
e1f13ee9ed Add GDateTime to GLib
GDateTime is an opaque data type containing a date and time
representation. It's immutable once created and reference
counted.

https://bugzilla.gnome.org/show_bug.cgi?id=50076

Based on the code by: Christian Hergert <chris@dronelabs.com>

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-08-24 23:41:21 +01:00
Emmanuele Bassi
3cee971db5 Add C_() to glibintl.h 2010-08-24 22:48:15 +01:00
Cody Russell
0a9bfa1c7d Add const to _pcre_ucp_othercase() definition in pcre_internal.h 2010-08-23 12:34:53 -05:00
Matthias Clasen
780d6bfa88 Improve testutils test coverage 2010-08-23 00:38:19 -04:00
Matthias Clasen
fa6926e5d4 Improve printf test coverage 2010-08-23 00:38:19 -04:00
Matthias Clasen
7d970fadbc Improve GDate test coverate 2010-08-23 00:38:19 -04:00
Dan Winship
8f5ec0dad3 Fix misc compiler warnings in (mostly) test programs 2010-08-19 18:24:53 -04:00
Christian Persch
a35efb0939 G_OPTION_FLAG_NO_ARG is only for callback options
Bug #627252.
2010-08-18 15:32:07 +02:00
Matthias Clasen
789c0cc877 Fix a doc format issue 2010-08-16 15:30:04 -04:00
Simon McVittie
c29d800d84 GVariant: be more explicit about adopting and returning floating refs
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=622770
2010-08-13 22:42:24 -04:00
Matthias Clasen
e02571e93b Add bug references to some tests 2010-08-13 21:23:23 -04:00
Matthias Clasen
63d19f0656 Fix doc format errors 2010-08-13 21:11:19 -04:00
Havoc Pennington
106bde0a8f GAsyncQueue: use g_queue_init() not g_queue_new()
By using g_queue_init() instead of g_queue_new(), we can avoid
a separate memory allocation.

Bug 626704
2010-08-13 00:33:04 -04:00
Matthias Clasen
733d209b14 Move GRegex docs inline 2010-08-08 23:55:11 -04:00
Matthias Clasen
c3e5b3cca8 Whitespace cleanup 2010-08-08 23:55:11 -04:00
Matthias Clasen
de3c6efa22 Remove two redundant comments 2010-08-08 23:55:11 -04:00
Matthias Clasen
b5bda64a73 Fix up a doc typo 2010-08-08 23:55:11 -04:00
Matthias Clasen
f5a5863975 Minor cleanup
The definition is now present in pcre.h
2010-08-08 23:55:11 -04:00
Matthias Clasen
def0dc01f7 Move GConvert docs inline 2010-08-08 23:55:11 -04:00
Matthias Clasen
f9a4b4ecc7 Add introspection annotations in gregex.c
Also, make the new getters follow the style of other GRegex getters,
and take a const GRegex *.
2010-08-08 21:32:04 -04:00
Matthias Clasen
14e0ad7c53 Don't compile some unused functions in gio/xdgmime/ 2010-08-08 21:32:04 -04:00
Matthias Clasen
7acdaf6f1d Don't compile an unused function 2010-08-08 21:32:04 -04:00
Matthias Clasen
3fd1fc4f9a Trivial typo fix 2010-08-08 21:32:04 -04:00
Matthias Clasen
c9916d64b1 Improve regex test coverage 2010-08-08 21:32:03 -04:00
Matthias Clasen
bbd1d2a724 Improve regex test coverage 2010-08-08 01:12:05 -04:00
Matthias Clasen
6ada7532b5 Drop some unused code
Some functions in pcre_get.c are not used.
2010-08-08 01:12:05 -04:00
Ryan Lortie
01cae84e47 Bug 578295 - gtester has a race condition
Deal with the race in GMainLoop by installing a do-nothing timeout.
2010-08-07 19:59:36 -04:00
Ryan Lortie
80046f36e0 gitignore update 2010-08-06 16:42:36 -04:00
Ryan Lortie
5e044a943c typo fix: Dist the data for the test cases
change 'dist_hook:' to 'dist-hook:'
2010-08-06 13:11:20 -04:00
Ryan Lortie
b3b7ea8e22 Replace -I with $(glib_INCLUDES) and friends
Stop using ad hoc -I in all of our Makefile.am.  Use the new variables
instead.
2010-08-06 13:10:34 -04:00
Ryan Lortie
78f7f14b34 Don't dist 'glibconfig.h'
This is causing very serious problems when doing out-of-tree builds from
tarballs on architectures that are different from the architecture that
the tarball was created on.

This commit breaks the build in those cases, but I'll fix that in the
next commits.

https://bugzilla.gnome.org/show_bug.cgi?id=626107
2010-08-06 10:53:07 -04:00
Ryan Lortie
25c6bdc22a error test case: don't double-free the source
g_propagate_prefixed_error() frees the source already, don't
g_error_free() it.
2010-08-06 10:29:32 -04:00
Hannes Müller
a1b015f7b7 avoid warning in gutils.h when using gcc with -Wconversion
https://bugzilla.gnome.org/show_bug.cgi?id=619026
2010-08-05 23:18:45 +02:00
paul
9f6faaffb6 Add $(top_builddir)/glib to includes
This is required to find glibconfig.h during srcdir != builddir builds
2010-08-05 09:08:34 -04:00
Matthias Clasen
008615f999 Test an option handling corner-case 2010-08-05 02:24:26 -04:00
Matthias Clasen
e2657d8dce Add a not about arguments beginning with dashes 2010-08-05 02:24:25 -04:00
David Zeuthen
5e6f762d61 GVariant: validate that passed string is UTF-8
As discussed with Ryan on IRC.

This check is crucial because it guarantees that
g_variant_get_string() will _always_ return valid UTF-8. Except in
cases where the programmer used unsafe API such as
g_variant_new_from_data() and setting @trusted to TRUE.

In fact, this check revealed a flaw in my polkit gdbus port

 (lt-polkitd:11632): GLib-CRITICAL **: g_variant_new_string: assertion
 `g_utf8_validate (string, len, NULL)' failed

and with this I could easily find the problem by using gdb(1) and
G_DBUS=fatal-warnings.

Without this check we'd pass the non-UTF8 string all the way to the
message bus and the bus would then disconnect us. So instead I was
seeing

  g_dbus_connection_real_closed: Remote peer vanished with error:
  Underlying GIOStream returned 0 bytes on an async read
  (g-io-error-quark, 0). Exiting.

and then SIGTERM as raised by g_dbus_connection_real_closed() and my
polkitd process would exit. This behavior is much harder to debug than
failing early (as this patch implements).

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-08-03 13:38:50 -04:00
Matthias Clasen
9b96e31968 Don't assert too much 2010-08-03 10:25:54 -04:00
Matthias Clasen
e4b5104003 Move bookmarkfile tests to the test framework 2010-08-03 10:25:54 -04:00
Emmanuele Bassi
b3de028a43 Update the Git ignore files 2010-08-03 14:21:02 +01:00
Mark Wielaard
f8ec75620d Don't add (extra) DESTDIR to tapsetdir for tapset_DATA.
https://bugzilla.gnome.org/show_bug.cgi?id=625876
2010-08-03 08:04:58 -04:00
Stef Walter
e7c7e46cf2 Add comment to g_date_set_time_val about local timezone.
Local time zone is used in conversion during g_date_set_time_val().
We now mention this in the documentation.

Fixes bug #625500
2010-08-01 07:22:11 +02:00
Matthias Clasen
ce7463a87b improve scanner api test coverage 2010-07-31 02:39:53 -04:00
Matthias Clasen
6d41af0f72 Improve tree test coverage 2010-07-31 02:15:03 -04:00
Matthias Clasen
a946577826 Improve keyfile test coverage 2010-07-31 02:14:51 -04:00
Matthias Clasen
ef4690c6c9 Test some GError functionality explicitly 2010-07-31 02:14:28 -04:00
Matthias Clasen
a4d0038c28 Add a test for g_variant_builder_add_parsed 2010-07-31 02:14:01 -04:00
Matthias Clasen
3c0f77a499 Fix a typo 2010-07-31 02:07:38 -04:00
Matthias Clasen
12e47411c3 Improve string test coverage 2010-07-31 00:56:11 -04:00
Matthias Clasen
dd25bdeff1 Improve byte array test coverage 2010-07-31 00:55:57 -04:00
Matthias Clasen
5f89498f07 improve printf tests coverage 2010-07-30 19:51:21 -04:00
Matthias Clasen
9100828185 Improve option context test coverage 2010-07-30 19:51:21 -04:00
Matthias Clasen
027905c27a Improve array test coverage 2010-07-30 19:51:21 -04:00
Matthias Clasen
03be0d7237 Move markup parse tests to the test framework 2010-07-30 19:51:21 -04:00
Matthias Clasen
60932b2f3d Improve regex test coverage 2010-07-30 19:51:20 -04:00
Matthias Clasen
154880b2ad Remove duplicate utf8 strreverse test
Also add some tests for find next/prev char.
2010-07-30 19:51:19 -04:00
Matthias Clasen
0e48b7ea7c Improve strfuncs test coverage a bit 2010-07-30 19:51:19 -04:00
Matthias Clasen
c617e94cf1 Improve option context test coverage a bit 2010-07-30 19:51:19 -04:00
Matthias Clasen
c4dd9fa41b Move markup collect tests to the test framework 2010-07-30 19:51:19 -04:00
Matthias Clasen
13ac9f94fd Add some more GFile tests 2010-07-30 19:51:19 -04:00
Matthias Clasen
b4ed2af52f Improve GNode test coverage a bit 2010-07-30 19:51:19 -04:00
Matthias Clasen
568eeeafe1 Add some logging tests 2010-07-30 19:51:18 -04:00
Matthias Clasen
2b113e4a9a Silence log handler tests 2010-07-30 19:51:18 -04:00
Matthias Clasen
b91cde6140 Improve tree test coverage 2010-07-30 19:51:18 -04:00
Matthias Clasen
c972d4df64 Move markup escape tests to test framework 2010-07-30 19:51:18 -04:00
Matthias Clasen
a804e22ed0 More pattern tests 2010-07-30 19:51:18 -04:00
Matthias Clasen
d3f0031361 Add tests for g_utf8_strreverse 2010-07-30 19:51:18 -04:00
Matthias Clasen
caa9453b72 Fix a warning 2010-07-30 19:51:18 -04:00
Matthias Clasen
d0750c9d6e Don't leak in converter test 2010-07-30 19:51:18 -04:00
Matthias Clasen
9d93dc5554 Remove some unused pcre code 2010-07-30 19:51:17 -04:00
Matthias Clasen
9fc3c980cc Add some volume monitor tests
Although not much of this is easily testable.
2010-07-30 19:51:17 -04:00
Matthias Clasen
e5a72ae3c4 Move queue tests to the test framework 2010-07-30 19:51:17 -04:00
Behdad Esfahbod
8f80ff02af Bug 624968 - div by zero in g_malloc_n family 2010-07-21 16:11:35 -04:00
Tomeu Vizoso
44cf10adce Add annotations for g_variant_new_strv and g_variant_get_strv 2010-07-15 17:05:00 +02:00
Ryan Lortie
3a8ab85d96 rename configure.in to configure.ac 2010-07-13 11:59:16 -04:00
Ryan Lortie
92df91590f trivial whitespace fix 2010-07-12 17:31:03 -04:00
Ryan Lortie
7791fce38a Fix some glib docs warnings
Remove some symbols from glib-sections.txt that gtk-doc has no idea
about.

Add proper callback typedefs for GTester (gtk-doc dislikes inline
function types).

Fix some other minor issues.
2010-07-12 16:56:52 -04:00
Matthias Clasen
dc8cf867c8 Don't return FALSE when a pointer is expected
Pointed out in bug 623956
2010-07-12 16:35:18 -04:00
Ryan Lortie
83d67bf2e7 move glibconfig.h to glib/ 2010-07-12 15:33:05 -04:00
Matthias Clasen
358b9d6ac7 Move main loop docs inline 2010-07-10 23:56:45 -04:00
Matthias Clasen
ab8cb652c8 Fix a typo 2010-07-10 23:56:45 -04:00
Matthias Clasen
e57291efdc Move docs for atomic operations inline 2010-07-10 23:56:45 -04:00
Matthias Clasen
e8503fddee Move GAsyncQueue docs inline 2010-07-10 23:56:45 -04:00
Colin Walters
d2fe46b476 Annotate all custom GIO GSource using g_source_set_name
Naming the sources allows easier debugging with e.g. SystemTap
probes.

https://bugzilla.gnome.org/show_bug.cgi?id=620536
2010-07-10 20:09:34 -04:00
Matthias Clasen
7568bb66f9 use proper feature test macros for isnan
Problem pointed out in bug 581354
2010-07-10 20:02:48 -04:00
Ryan Lortie
d44ae96cb1 GVariant: fix some more leaks in error cases 2010-07-10 19:15:59 -04:00
Ryan Lortie
90c49a0654 move the g_free() from the last commit down
It is needed for the error message...
2010-07-10 19:15:59 -04:00
Ryan Lortie
48a04f9303 GVariant: don't leak during type inferencing 2010-07-10 16:56:51 -04:00
Matthias Clasen
cc44ef148c Improve some GNode docs
See bug 561248
2010-07-08 19:26:25 -04:00
Matthias Clasen
ac342a8d0c Expand the g_sprintf docs
As requested in bug 576833.
2010-07-08 19:23:42 -04:00
Matthias Clasen
7cfa23b177 Add a note about l10n to the g_strconcat docs
As requested in bug 576854
2010-07-08 19:03:18 -04:00
Matthias Clasen
e0f2d0f28e Comment out an unused function
it is causing warnings, so it needs to die...bug 622600
2010-07-08 16:32:08 -04:00
Ryan Lortie
a00fa340cb base64: remove unnecessary assertions
Allow base64 encoding/decoding of empty strings.
2010-07-07 22:18:47 -04:00
Matthias Clasen
ddb919245c forgotten file 2010-07-07 22:03:02 -04:00
Ryan Lortie
2e53e50244 glib/: fully remove galias hacks 2010-07-07 19:34:35 -04:00
Ryan Lortie
c243905c95 .gitignore updates 2010-07-07 16:52:41 -04:00
Ryan Lortie
32ce3e051a fix trivial copy/paste error in bytestring docs 2010-07-07 16:32:46 -04:00
Ryan Lortie
d9e90c3894 GVariant: improve bytestring support
- add G_VARIANT_TYPE_BYTESTRING, _BYTESTRING_ARRAY, _STRING_ARRAY

 - remove g_variant_{new,get}_byte_array functions

 - add g_variant_{new,get,dup}_bytestring{,_array} functions

 - remove undocumented support for deserialising arrays of objectpaths
   or signature strngs using g_variant_get_strv()

 - add and document new format strings '^ay', '^&ay', '^aay' and '^a&ay'

 - update GApplication to use the new API

 - update GSettings binding code to use the new API

 - add tests
2010-07-07 16:25:48 -04:00
Matthias Clasen
46a80b38c3 Don't forget to dist keyfiletest.ini 2010-07-07 00:59:44 -04:00
Matthias Clasen
f0b6cbb139 Fix problems with the keyfile test
We must set XDG_DATA_HOME early on, and we must clear error
before using it.
2010-07-06 07:43:19 -04:00
Matthias Clasen
eea9d343cc Improve keyfile test coverage 2010-07-06 00:01:40 -04:00
Matthias Clasen
ee89ed241c Define SRCDIR 2010-07-06 00:01:15 -04:00
Matthias Clasen
a3bda1acfc Add some GDir tests 2010-07-05 23:43:47 -04:00
Matthias Clasen
c5fcd21e33 Improve uri test coverage 2010-07-05 23:30:10 -04:00
Matthias Clasen
b720732059 Move uri tests to the test framework 2010-07-05 23:13:18 -04:00
Matthias Clasen
123ba622d3 Add more list tests 2010-07-05 23:13:18 -04:00
Matthias Clasen
953962d783 Move tree tests to the test framework 2010-07-05 23:13:18 -04:00
Matthias Clasen
5123bc69e7 Move slist tests to the test framework 2010-07-05 23:13:18 -04:00
Matthias Clasen
b61fd45ac3 Move list tests to the test framework 2010-07-05 23:13:18 -04:00
Matthias Clasen
af299df44e Remove cases of ;; 2010-07-05 23:13:17 -04:00
Matthias Clasen
26e29cb360 Move charset conversion tests to the test framework 2010-07-04 20:51:06 -04:00
Milan Bouchet-Valat
ab6b6c68c5 Bug 622294 - More annotations for GVariant
This adds annotations to all functions in gvariant.c. A few docs
were also fixed (wrong parameter names, missing mention that NULL
is allowed).
2010-06-29 19:35:39 +02:00
Matthias Clasen
eb454a1cb4 Fix a alloc/free mismatch
Pointed out in http://bugzilla.redhat.com/show_bug.cgi?id=608453
by David Tardon.
2010-06-27 19:27:04 -04:00
Kristian Rietveld
87fd38bc4d Add PCRE_EXP_DECL to pcre_callout declaration
Fixes build on Mac OS X.
2010-06-26 22:55:47 +02:00
Dan Winship
1ad08a6a9f Hack up glib/tests/array-test to not actually malloc 2G
Fixes the test on machines where that allocation takes very long.

https://bugzilla.gnome.org/show_bug.cgi?id=610784
2010-06-24 16:02:39 -04:00
Ryan Lortie
b638a675a8 Ignore more glib test cases 2010-06-24 00:41:18 -04:00
Ryan Lortie
fb94e65a64 GChecksum: accept NULL pointer with length 0
Several GChecksum functions were incorrectly aborting when passed a NULL
data pointer, even if the length parameter was equal to zero.
2010-06-24 00:39:38 -04:00
Matthias Clasen
17bc9bf94f Deprecate some rarely-used APIS
GRelation and GCompletion are almost never used, and not very actively
maintained. Mark them as deprecated to make this clear. Bug #551271.
2010-06-23 22:32:35 -04:00
Ryan Lortie
d3af9c0ec5 neutralise pltcheck.sh 2010-06-23 10:12:14 -04:00
Matthias Clasen
8eb755e78e Add some more unicode property tests 2010-06-23 09:25:29 -04:00
Matthias Clasen
e26b92b947 Move node tests to the test framework 2010-06-23 09:25:29 -04:00
Matthias Clasen
464b5ff357 Some more hash, utils and checksum tests 2010-06-23 09:25:29 -04:00
Matthias Clasen
01abbc4bd3 Move node test to the test framework 2010-06-23 09:25:29 -04:00
Matthias Clasen
5c1b3a0263 Move date tests to the test framework 2010-06-23 09:25:29 -04:00
Milan Bouchet-Valat
b116838da3 Improve documentation for g_strcmp0()
Be more explicit about the handling of two NULL pointers.

https://bugzilla.gnome.org/show_bug.cgi?id=622480
2010-06-23 14:35:42 +02:00
Ryan Lortie
16c2f08049 Add single include guards to gvariant[type].h 2010-06-22 08:10:05 -04:00
Tor Lillqvist
05354cefc5 Make the protocol.c test program compile on Windows
Note that it does not actually work, though. Maybe because
g_io_channel_set_flags() is not implemented for file descriptor based
GIOChannels on Windows.
2010-06-22 12:41:01 +03:00
Matthias Clasen
045c96b71a Add a test for g_strip_prefix 2010-06-21 23:08:01 -04:00
Matthias Clasen
2f438f18ae Move hash tests to the test framework 2010-06-21 23:08:01 -04:00
Matthias Clasen
7d14b5fbf1 Some more tests 2010-06-21 23:08:01 -04:00
Matthias Clasen
5629366c3d Move checksum tests to the test framework 2010-06-21 23:08:01 -04:00
Matthias Clasen
839078ea63 Add some more Unicode tests 2010-06-21 23:08:01 -04:00
Ryan Lortie
a4b42d3a75 .gitignore the moved tests 2010-06-21 13:57:54 -04:00
Ryan Lortie
c9553af68f Use -Bsymbolic-functions, drop g*alias PLT hackery
This is a minimal patch-out of the galias functionality.  We will do a
release like this so that we can easily back it out if there are
reported problems.

A more substantial cleanup (mostly removing #includes from every file)
will follow if there are no issues.
2010-06-21 13:55:28 -04:00
Sven Herzberg
6c02c99df0 don't treat debug/info/message as fatal messages by default
* glib/gtestutils.c: don't treat non-fatal messages as errors
* glib/tests/.gitignore: silence
* glib/tests/Makefile.am: updated
* glib/tests/protocol.c: add a test for the message treatment
2010-06-21 12:34:44 +02:00
Matthias Clasen
60a5b19799 Add a test for g_unichar_validate 2010-06-21 00:00:51 -04:00
Matthias Clasen
f13618623b Test inplace decoding 2010-06-20 23:46:01 -04:00
Matthias Clasen
db5bd7b90b Some more utf8 tests 2010-06-20 23:35:31 -04:00
Matthias Clasen
a2f4564fd9 Test glib_check_version 2010-06-20 23:07:39 -04:00
Matthias Clasen
bad7f1e54f Some fixes 2010-06-20 22:18:30 -04:00
Matthias Clasen
7bea2a7a4f Move utf8 validation tests to the test framework 2010-06-20 21:16:24 -04:00
Matthias Clasen
5b08ef84e4 Move utf8 pointer tests to test framework 2010-06-20 21:04:47 -04:00
Matthias Clasen
0ed575213b Consolide base64 tests in a single file 2010-06-20 16:53:39 -04:00
Matthias Clasen
08d6e535be Move scanner tests to glib/tests 2010-06-20 16:53:38 -04:00
Ryan Lortie
87df095de3 GVariant: fix doc copy/paste error 2010-06-20 12:32:00 -04:00
Ryan Lortie
ede159ec45 Add enum type for GVariantParseError 2010-06-20 12:31:37 -04:00
Matthias Clasen
09aa2e79ab Move sequence tests to the test framework 2010-06-20 12:23:13 -04:00
Matthias Clasen
bf8ce25216 Move base64 tests of to test framework 2010-06-20 11:34:31 -04:00
Matthias Clasen
f849dbac05 Move regex tests to the g_test framework 2010-06-20 11:20:54 -04:00
Matthias Clasen
85621f1a0f Update the include pcre to 8.02 2010-06-20 01:46:35 -04:00
Matthias Clasen
b0b7aeffc0 Add Unicode 5.2 scripts 2010-06-20 01:14:55 -04:00
Matthias Clasen
5fffa39b6a Fix a memory leak in g_ptr_array_remove_index_fast
We need to call the element_free_func even if we remove the
last element. Bug #618866.
2010-06-20 00:15:31 -04:00
Christian Persch
052ef2614a Add g_variant_is_floating 2010-06-19 19:07:36 +02:00
Ryan Lortie
f2ae621777 Revert "GVariant: add g_variant_default_value()"
This reverts commit b205dc77cb.

We decided to go the other route with the GParamSpec.
2010-06-17 14:58:46 -04:00
Ryan Lortie
4275c68c30 GVariant serialiser: fix small type error 2010-06-16 18:22:48 -04:00
Ryan Lortie
b205dc77cb GVariant: add g_variant_default_value()
Returns various kinds of false, zero, empty arrays, etc.
2010-06-16 15:58:53 -04:00
Christian Persch
1b8ee5196e Sprinkle some $(AM_V_GEN) around to make the build more silent. 2010-06-15 22:01:02 -04:00
Emmanuele Bassi
6d1d9cf1b5 gobject: Add GBinding
GBinding is a simple, opaque object that represents a binding between a
property on a GObject instance (source) and property on another GObject
instance (target).

https://bugzilla.gnome.org/show_bug.cgi?id=348080
2010-06-15 16:06:18 +01:00
Matthias Clasen
08f473ffef Prevent division by zero if no tests 2010-06-15 02:01:16 -04:00
Matthias Clasen
53f70ac43b Forgotten file 2010-06-15 01:50:15 -04:00
Robert Collins
f9e8b5d9d4 Add subunit support to gtester-report
This patch adds subunit support to gtester-report via a -s switch. Subunit
(https://launchpad.net/subunit) is a language neutral test activity protocol.
This can be used to integrate gtester tests with the Hudson CI tool amongst
other things.

Bug #611869.
2010-06-15 01:49:44 -04:00
Robert Collins
8de6d03c44 Use optparse to parse gtester-report commandline options
See bug #611778.
2010-06-15 01:37:27 -04:00
Emmanuele Bassi
ddb9a2f264 Add package and version to the test report XML 2010-06-15 01:31:18 -04:00
Matthias Clasen
9971686b7e Reword a doc comment
To take out some awkward wording.
2010-06-15 00:50:36 -04:00
Ryan Lortie
8d3fea9cff Mention GVariant format string docs from iter docs
It's not entirely clear what @format_string in iter_next() and
iter_loop() should be.  Include a link to the GVariant format string
docs as a hint.
2010-06-10 08:07:34 -04:00
Tor Lillqvist
507c266c3b Plug memory leak on Windows
Intern the string returned from g_win32_getlocale() and then free it.
Fixes bug #621168.
2010-06-10 11:54:35 +03:00
Ryan Lortie
653921e17a g_variant_builder_add_parsed: fix type error
Problem caught by Juan A. Suarez Romero
2010-06-09 12:43:45 -04:00
Matthias Clasen
a0c044b5c6 Make g_assertion_message_error take a const GError*
This was requested in bug 620265.
2010-06-06 16:42:06 -04:00
Javier Jardón
a131beda54 [docs] Improve the g_get_system_config_dirs() docs.
The retrieved list of directories is XDG_CONFIG_DIRS,
Also mention the retrieved directory on Windows: CSIDL_COMMON_APPDATA
2010-06-06 05:26:38 +02:00
Javier Jardón
e08c7b86c4 [docs] Improve the g_get_system_data_dirs() docs.
The retrieved list of directories is XDG_DATA_DIRS
2010-06-06 05:15:22 +02:00
Javier Jardón
07777db60d [docs] Improve the g_get_user_cache_dir() docs
The retrieved directory is XDG_CACHE_HOME on UNIX platforms.
Also mention the retrieved directory on Windows: CSIDL_INTERNET_CACHE.
2010-06-06 05:05:15 +02:00
Javier Jardón
e40b5ae3ef [docs] Improve the g_get_user_data_dir() docs
The retrieved directory is XDG_DATA_HOME on UNIX platforms.
Also mention the retrieved directory on Windows: CSIDL_PERSONAL.
2010-06-06 04:57:46 +02:00
Javier Jardón
b2718ee71a [docs] Improve the g_get_user_config_dir() docs a bit
The retrieved directory is XDG_CONFIG_HOME on UNIX platforms.
Also mention the retrieved directory on Windows: CSIDL_APPDATA.
2010-06-05 18:40:07 +02:00
Ryan Lortie
9562726f35 Bug 620350 - add g_variant_builder_add_parsed()
A delicious blend of g_variant_new_parsed() and
g_variant_builder_add_value().  Now available in a GLib near you.
2010-06-03 11:24:31 +02:00
Ryan Lortie
44db2b6b74 Bug 620349 – utf8ify GVariant printer
Take advantage of our knowledge that GVariant strings are always valid
utf8 when printing and parsing:

  - allow valid printing unicode characters to pass through unescaped

  - escape non-printing characters using \uxxxx or \Uxxxxxxxx format

  - do the same in the parser

  - update existing test cases to use utf8, add a new test case
2010-06-03 09:41:33 +02:00
Milan Bouchet-Valat
3682666140 Annotate GVariant and GSettings _strv() functions
Add GObject introspection annotations so that the length parameter is
correctly detected for g_variant_new_strv(), g_variant_get_strv() and
g_variant_dup_strv(). Also specify that it can be a NULL pointer in
g_variant_get_strv() and g_variant_dup_strv().

For g_settings_set_strv(), detect that a NULL value is allowed, meaning
empty array.

Closes bug #620384.

Signed-off-by: Ryan Lortie <desrt@desrt.ca>
2010-06-02 19:37:30 +02:00
Alexander Larsson
bef9efd0a9 Initial support for dtrace and systemtap
This adds static markers for dtrace, which are also usable
by systemtap. Additionally it adds a tapset for systemtap
that makes it easier to use the static markers.

These are enabled by default.

This initial set of probes is rather limited:

* allocation and free using g_malloc & co
* allocation and free using g_slice
* gquark name tracking (useful for converting quarks to strings in probes)

Notes on naming:

Its traditional with dtrace to use probe names with dashes as
delimiter (slice-alloc). Since dashes are not usable in identifiers
the C code uses double underscores (slice__alloc) which is converted
to dashes in the UI. We follow this for the shared lowlevel probe
names.

Additionally dtrace supports putting a "provider" part in the probe
names which is essentially a namespacing thing. On systemtap this
field is currently ignored (but may be implemented in the future), but
this is not really a problem since in systemtap the probes are
specified by combining the solib file and the marker name, so there
can't really be name conflicts.

For the systemtap tapset highlevel probes we instead use names that
are systemtapish with single dashes as separators.

https://bugzilla.gnome.org/show_bug.cgi?id=606044
2010-05-27 14:51:41 -04:00
Mikhail Zabaluev
c3bc0f4f8f Optimized the overlong sequence check in g_utf8_get_char_extended()
Rather make it branch to get the due sequence length for the resulting
character code, we can as well get the minimum code value in the initial
branching.
2010-05-27 14:00:12 -04:00
Ryan Lortie
e7927faf17 GVariant: One more FreeBSD fix
FreeBSD's malloc() sometimes returns unaligned memory if you are
requesting small sizes.  This can get GVariant into trouble.  For
example, consider the type "mmi" containing the value "just nothing".
According to the type signature, the memory containing this should be
aligned to a boundary of 4 since it might contain an int.  The
serialised size of this value is 1 byte, however, and when you ask
FreeBSD to allocate memory of that size, it knows you can't put an int
into it so it doesn't bother aligning it.

This patch modifies the GVariant serialiser to not assert the alignment
constraint in the case that the size of the serialised data is smaller
than its own alignment requirement.
2010-05-27 11:32:34 -04:00
Ryan Lortie
271997deb5 More alignment-related fixes.
Partial-backout 8a21d8d233.  The
assertions should have remained relaxed since these functions are used
with non-posix_memalign()ed data.
2010-05-27 11:07:19 -04:00
Ryan Lortie
91ec834456 include "config.h" for HAVE_POSIX_MEMALIGN 2010-05-26 17:35:18 -04:00
Ryan Lortie
8a21d8d233 Use aligned memory in GVariant test cases.
The GVariant serialiser works well with non-8-aligned memory, but the
comparison serialiser in the test case depends on memory being
8-aligned.  Use posix_memalign() to get the memory used by this
serialiser.
2010-05-26 17:31:52 -04:00
Colin Walters
ba1163a33c [tests/gvariant] Handle flavored_free(NULL), since flavored_malloc can return NULL 2010-05-26 15:59:36 -04:00
Havoc Pennington
6b53e4826f GSource: add g_source_set_name, g_source_get_name, g_source_set_name_by_id
These allow applications to give meaningful names to their sources.
Source names can then be used for debugging and profiling, for
example with systemtap or gdb.

https://bugzilla.gnome.org/show_bug.cgi?id=606044
2010-05-25 16:59:22 -04:00
Havoc Pennington
e5696c282e GSource: add g_source_set_name, g_source_get_name, g_source_set_name_by_id
These allow applications to give meaningful names to their sources.
Source names can then be used for debugging and profiling, for
example with systemtap or gdb.

https://bugzilla.gnome.org/show_bug.cgi?id=606044
2010-05-25 13:45:28 -04:00
Ryan Lortie
a81c2f2c7a GVariant: deal with non-8-aligned malloc()
Closes bug #619585.
2010-05-25 11:26:18 -04:00
Richard Hughes
100df5287d Fix up a typo in the g_variant_builder_add() docs 2010-05-24 17:22:38 +01:00
Christian Persch
41b3f6885d Add g_dc[p]gettext, and use it in gsettings
Avoid using LC_MESSAGES, and just call g_d[c]gettext directly.

Bug #617004.
2010-05-20 21:16:29 +02:00
Ryan Lortie
4967b6d2ab gitignore additions for gdbus, new test cases 2010-05-17 07:16:37 -04:00
Ryan Lortie
c57c61c930 fix glaring inaccuracy in GVariant docs 2010-05-14 17:08:01 +02:00
Sebastian Dröge
936ff022f2 Don't include __bss_start, _edata and _end symbols in the abichecks
They are added by the binutils gold linker.
2010-05-11 06:17:25 +02:00
Robert Bragg
03b5db4477 gtester-report: cope with binaries with no test cases
It's possible that a given binary may conditionally decided not to run
any test cases (e.g. since they are all slow but -m=quick is currently
in use) In this case the xml may contain <testbinary> nodes with no
<testcase> children. This was resulting in a divide by zero when
calculating the green → red color interpolation.

https://bugzilla.gnome.org/show_bug.cgi?id=617914
2010-05-09 16:28:32 +01:00
Simon McVittie
6bea235c8b Support 64bit integers in GKeyFile 2010-05-08 21:30:27 -04:00
Matthias Clasen
c13c36e3b9 Add test for g_get_language_names 2010-05-08 20:58:10 -04:00
Javier Jardón
81e98c399e Clean Glib header #include issues: gthread 2010-05-06 17:42:09 +02:00
Javier Jardón
c7940d8180 Clean Glib header #include issues: gmem 2010-05-06 17:42:09 +02:00
Javier Jardón
21302a741c Clean Glib header #include issues: gtestutils 2010-05-06 17:42:09 +02:00
Javier Jardón
d1642386c9 Clean Glib header #include issues: gasyncqueue 2010-05-06 17:42:09 +02:00