Commit Graph

615 Commits

Author SHA1 Message Date
Matthias Clasen
5694ab7642 Revert "Move gio tests from gio/tests/ to tests/gio/"
This reverts commit 2262d76b33.

Move GIO tests back to where they belong.
2009-07-05 22:49:24 -04:00
Dan Winship
29e6525b1e Two "make check" fixes for late changes to the thread-context patch
g_simple_async_result_complete() now checks that it's being run from
the correct main loop, so tests/gio/simple-async-result was failing,
because it called it from outside any main loop. (And gio's pltcheck
was failing because I hadn't added g_main_current_source() to it.)
2009-07-01 13:52:49 -04:00
Benjamin Otte
2262d76b33 Move gio tests from gio/tests/ to tests/gio/
This avoids getting tests built every time when working on libgio and
running make in the gio/ directory.
2009-07-01 19:03:19 +02:00
Hans Breuer
75ef018248 Updated msvc build files 2009-05-30 15:29:23 +02:00
Matthias Clasen
f33a484b4a Fix up tests forgotten in Michaels commit
When Michael cleaned up after my fumbled commit of his gmarkup
optimizations, he fumbled himself and forgot to fix up the tests...
2009-05-03 17:10:16 -04:00
Dan Winship
92ac8d165e Misc warning fixes
glib/pcre/pcre_ucp_search_funcs.c, glib/pcre/pcre_valid_utf8.c: add
back missing config.h includes, and this time add them to the copies
in glib/update-pcre/ too so they don't get lost again on the next PCRE
update.

glib/garray.c, glib/gbase64.c: fix signed/unsigned pointer casts

gio/xdgmime/xdgmimeglob.c: remove unused variable

gio/tests/live-g-file.c: fix printf args on x86_64

tests/Makefile.am, tests/regex-test.c: remove redundant -DENABLE_REGEX
2009-05-01 10:37:45 -04:00
Peter Kjellerstedt
efc2cdbfc9 Fix parsing of timezones
Make g_time_val_from_iso8601 handle timezones with minutes correctly;
also accept comma as a fraction separator.  (#578369)
2009-04-08 10:26:11 -04:00
Matthias Clasen
84fdf0d00e Fix distcheck
svn path=/trunk/; revision=7932
2009-03-01 16:46:45 +00:00
Matthias Clasen
82e1d3e753 Bug 523742 – Use noinst for non-installable libraries
* tests/Makefile.am: use noninst_LTLIBRARIES for noninstalled
        libraries.Patch by Björn Lindqvist


svn path=/trunk/; revision=7860
2009-02-12 03:55:38 +00:00
Dan Winship
b9cf1ed275 update
* glib/tests/.gitignore: update

	* tests/.gitignore: update, sort

	* tests/gobject/.gitignore: add

svn path=/trunk/; revision=7772
2009-01-05 14:56:55 +00:00
Matthias Clasen
c6404e8329 Accept short data
svn path=/trunk/; revision=7625
2008-10-24 04:10:50 +00:00
Dan Winship
5c53925ed0 Bug 553447 $(Q#|(B g_assert_no_error()
* glib/gtestutils.h (g_assert_no_error, g_assert_error): Macros to
	assert that a GError is not set, or else is set to a particular
	error.

	* glib/gtestutils.c (g_assertion_message_error): utility for
	those macros

	* glib/tests/keyfile.c:
	* tests/asyncqueue-test.c:
	* tests/bookmarkfile-test.c:
	* tests/convert-test.c:
	* tests/file-test.c: Use g_assert_error/g_assert_no_error

svn path=/trunk/; revision=7555
2008-09-27 01:43:29 +00:00
Ryan Lortie
920f3bffb3 Bug 549771 – improved .gitignore for glib
2007-09-02  Ryan Lortie  <desrt@desrt.ca>

        Bug 549771 – improved .gitignore for glib

        * docs/reference/.gitignore:
        * docs/reference/gio/.gitignore:
        * docs/reference/gobject/tmpl/.gitignore:
        * gio/.gitignore:
        * gio/tests/.gitignore:
        * glib/.gitignore:
        * glib/libcharset/.gitignore:
        * glib/tests/.gitignore:
        * gmodule/.gitignore:
        * gobject/.gitignore:
        * gobject/tests/.gitignore:
        * po/.gitignore:
        * tests/.gitignore: new files
        * .gitignore: remove 'build' (since it's part of glib now), add more
        useful things.


svn path=/trunk/; revision=7432
2008-09-02 18:40:39 +00:00
Paolo Borelli
e6eb809599 Bug 550040 - Move GString, rand and printf tests to the unit test
2008-09-01  Paolo Borelli  <pborelli@katamail.com>

	Bug 550040 - Move GString, rand and printf tests to the unit test
	framework

	* tests/printf-test.c:
	* tests/rand-test.c:
	* tests/string-test.c:
	Removed

	* glib/tests/printf.c:
	* glib/tests/rand.c:
	* glib/tests/string.c:
	Added

	* tests/Makefile.am:
	* glib/tests/Makefile.am:
	Updated for the above


svn path=/trunk/; revision=7419
2008-09-01 09:31:40 +00:00
Bastien Nocera
f84518e35b Bug 548612 – g_strstr_len() should use memmem when available
2008-08-28  Bastien Nocera  <hadess@hadess.net>

	Bug 548612 – g_strstr_len() should use memmem when available

	* glib/tests/strfuncs.c (test_strstr):
	* tests/string-test.c (main): Patch by Paolo Borelli
	<pborelli@katamail.com> to move the tests to the right place,
	and add more tests

	* glib/gstrfuncs.c (g_strstr_len): Fix problem with memmem ignoring
	nul-terminators in strings, and using the haystack_len instead


svn path=/trunk/; revision=7409
2008-08-28 12:53:59 +00:00
Bastien Nocera
5e2a6047ea Bug 548612 – g_strstr_len() should use memmem when available
2008-08-28  Bastien Nocera  <hadess@hadess.net>

	Bug 548612 – g_strstr_len() should use memmem when available

	* configure.in: detect whether memmem is available in the C library
	* glib/gstrfuncs.c (g_strstr_len): use memmem for g_strstr_len() if
	available in it's available, as it could be optimised by the C library
	* tests/string-test.c (main): Add a few tests for g_strstr_len()


svn path=/trunk/; revision=7407
2008-08-27 23:23:23 +00:00
Matthias Clasen
88c7129340 Bug 547337 – G_DISABLE_DEPRECATED breaks tests build
2008-08-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 547337 – G_DISABLE_DEPRECATED breaks tests build

        * tests/testglib.c: Protect deprecated API by ifdefs.
        Patch by Kalle Vahlman


svn path=/trunk/; revision=7353
2008-08-14 03:05:17 +00:00
Ryan Lortie
ce42e7ad4a Fix 'fail' markup test cases to -not- be valid XML 1.1.
2008-08-08  Ryan Lortie  <desrt@desrt.ca>

        * tests/markups/fail-32.gmarkup: change &#x10; to &#x0; since the
        former is no longer a failure.


svn path=/trunk/; revision=7328
2008-08-08 18:35:19 +00:00
Tor Lillqvist
b5b363019a Avoid warning on Win64 by using gintptr cast instead if long cast.
2008-08-04  Tor Lillqvist  <tml@novell.com>

	* tests/testglib.c: Avoid warning on Win64 by using gintptr cast
	instead if long cast.


svn path=/trunk/; revision=7304
2008-08-04 18:12:11 +00:00
Matthias Clasen
6e55e05284 Remove leftovers
svn path=/trunk/; revision=7243
2008-07-23 16:22:32 +00:00
Emmanuele Bassi
bcdc09e641 Do not set the timestamp value using time(), as it will be overwritten
2008-07-21  Emmanuele Bassi  <ebassi@gnome.org>

	* glib/gbookmarkfile.c:
	(bookmark_app_info_new): Do not set the timestamp value
	using time(), as it will be overwritten anyway. (#535223,
	Michael Meeks)

	(parse_application_element),
	(bookmark_app_info_dump): Support the "modified" attribute,
	which takes an ISO-formatted string instead of a Unix time
	stamp, to keep the number of g_strdup_printf() calls to a
	minimum.

	* glib/gtimer.c:
	(g_time_val_to_iso8601): Do not use strftime(): we know
	the format and contents of the ISO 8601 date format we
	use.

	* tests/bookmarks/valid-03.xbel: Add a test file for the
	modified attribute.

svn path=/trunk/; revision=7231
2008-07-21 13:05:24 +00:00
Matthias Clasen
d0008f0070 Move another test
svn path=/trunk/; revision=7209
2008-07-20 02:09:05 +00:00
Matthias Clasen
d0bd89a301 Move another test
svn path=/trunk/; revision=7198
2008-07-18 07:07:39 +00:00
Matthias Clasen
063c43c0d8 Move tests around
svn path=/trunk/; revision=7197
2008-07-18 06:25:23 +00:00
Matthias Clasen
3ec443b188 Ignore the error if iconv doesn't support EUC-JP.
* tests/iochannel-test.c: Ignore the error if iconv doesn't
        support EUC-JP.


svn path=/trunk/; revision=7182
2008-07-14 19:31:33 +00:00
Matthias Clasen
7560b45764 Print error messages when something fails
svn path=/trunk/; revision=7181
2008-07-14 19:15:18 +00:00
Matthias Clasen
052f3e6bd9 Skip a test if iconv doesn't support the encoding
svn path=/trunk/; revision=7180
2008-07-14 18:17:20 +00:00
Michael Natterer
4cd8caa6c7 Bug 541208 – Functions to easily install and use signals without class
2008-07-04  Michael Natterer  <mitch@imendio.com>

	Bug 541208 – Functions to easily install and use signals without
	class struct slot

	* tests/gobject/override.c: added tests for the new gsignal
	overriding and chaining APIs.


svn path=/trunk/; revision=7158
2008-07-04 11:10:48 +00:00
Paolo Borelli
96f99d334d Bug 539770 - migrate gstrfunc unit tests to gtest
2008-06-24  Paolo Borelli  <pborelli@katamail.com>

	Bug 539770 - migrate gstrfunc unit tests to gtest

	* tests/strfunc-test.c:
	* tests/testglib.c:
	* tests/strtoll-test.c:
	* tests/strtod-test.c:
	* tests/string-test.c:
	* tests/Makefile.am:
	Removed old tests.

	* glib/tests/fileutils.c:
	* glib/tests/strfuncs.c:
	* glib/tests/Makefile.am:
	Added all the old tests migrated to the new unit test framework
	and add new unit tests for some of the functions.


svn path=/trunk/; revision=7097
2008-06-24 13:55:22 +00:00
Johan Dahlin
761424465a Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch


svn path=/trunk/; revision=7092
2008-06-22 15:10:51 +00:00
Matthias Clasen
d780a41c37 set tv_usec to 0 rather than 1 when a fraction of a second is not
* glib/gtimer.c (g_time_val_from_iso8601): set tv_usec to 0 rather
        than 1 when a fraction of a second is not specified
        (g_time_val_from_iso8601): calculate a fraction of a second
        correctly even in case it does not happen to consist of exactly
        six digits; do not allow random data after the ISO 8601 string,
        only whitespace
        (make g_time_val_to_iso8601): support fractions of a second
        Patch by Peter Kjellerstedt

        * tests/testglib.c: Update to match


svn path=/trunk/; revision=7057
2008-06-19 04:14:25 +00:00
Michael Natterer
a8a3606966 Bug 535628 - test/patterntest.c still includes gpattern.h directly.
2008-05-30  Michael Natterer  <mitch@imendio.com>

	Bug 535628 - test/patterntest.c still includes gpattern.h
	directly.

	* tests/patterntest.c: don't include "glib/gpattern.h" directly.
	Patch from Hiroyuki Ikezoe.


svn path=/trunk/; revision=6964
2008-05-30 09:05:08 +00:00
Michael Natterer
82bc28361e add G_DISABLE_SINGLE_INCLUDES to CPPFLAGS globally.
2008-05-28  Michael Natterer  <mitch@imendio.com>

	* configure.in: add G_DISABLE_SINGLE_INCLUDES to CPPFLAGS
	globally.

	* glib/tests/option-context.c
	* glib/tests/testing.c
	* tests/testingbase64.c: don't include <glib/gtestutils.h>


svn path=/trunk/; revision=6955
2008-05-28 16:18:27 +00:00
Matthias Clasen
2356ba3471 Update to Unicode 5.1
svn path=/trunk/; revision=6944
2008-05-27 16:20:27 +00:00
17:40:58 Tim Janik
d6682a1f2d fixed gstdio.h include.
2008-04-18 17:40:58  Tim Janik  <timj@imendio.com>

        * tests/testglib.c: fixed gstdio.h include.

        * tests/Makefile.am: properly list testglib.c SOURCES.



svn path=/trunk/; revision=6862
2008-04-18 15:40:38 +00:00
Matthias Clasen
fe751b255f Small test fixup
svn path=/trunk/; revision=6652
2008-03-10 15:13:29 +00:00
Matthias Clasen
11d7305d5a Don't test user directories for being non-null. (#517084, Yevgen Muntyan)
2008-02-23  Matthias Clasen  <mclasen@redhat.com>

        * tests/testglib.c: Don't test user directories for being
        non-null.  (#517084, Yevgen Muntyan)

svn path=/trunk/; revision=6562
2008-02-23 05:14:34 +00:00
Marco Barisione
7e0677b076 Don't return duplicate matches when matching empty strings. (#515944) Add
2008-02-17  Marco Barisione  <marco@barisione.org>

	* glib/gregex.c: (match_info_new), (g_match_info_next): Don't return
	duplicate matches when matching empty strings.  (#515944)
	* tests/regex-test.c: Add tests.

svn path=/trunk/; revision=6527
2008-02-17 14:07:32 +00:00
Matthias Clasen
f5542c90e3 Make the g_test_add macro work with gcc 4.3
2008-02-10  Matthias Clasen <mclasen@redhat.com>

        * glib/gtestutils.h: Make the g_test_add macro work with
        gcc 4.3

        * tests/gobject/paramspec-test.c: Adapt to recent changes in
        GParamGType initialization.


svn path=/trunk/; revision=6500
2008-02-11 18:28:42 +00:00
Matthias Clasen
da0e7e81c1 /bin/ksh can't handle a for-loop with no arguments, so add a "." for when
2008-02-09  Matthias Clasen <mclasen@redhat.com>

        * Makefile.decl: /bin/ksh can't handle a for-loop with no
        arguments, so add a "." for when $(SUBDIRS) is empty.

        * glib/tests/option-context.c:
        * glib/tests/testing.c:
        * gthread/gthread-posix.c:
        * tets/testingbase64.c:
        * glib/gtester.c:
        * glib/gsequence.c: Portability fixes.  (#515154)



svn path=/trunk/; revision=6487
2008-02-10 04:41:25 +00:00
Sebastian Wilhelmi
fa7351324a Grab thread_counter_pools LOCK when increasing leftover_task_counter.
2008-01-29  Sebastian Wilhelmi  <wilhelmi@google.com>

	* tests/threadpool-test.c (test_thread_pools): Grab
	thread_counter_pools LOCK when increasing
	leftover_task_counter. Fixes race in test. (#512624, Simon Murray)

svn path=/trunk/; revision=6406
2008-01-29 10:07:07 +00:00
Dan Winship
cc1404cfc8 fix this; the previous code gave the wrong md5sum when called in certain
* glib/gchecksum.c (md5_sum_update): fix this; the previous code
	gave the wrong md5sum when called in certain ways with buffers
	larger than 64 bytes.
	(g_checksum_update): remove the unnecessary "length > 1"
	restriction

	* tests/checksum-test.c: Rewrite this to be much more exhaustive
	(and in particular to test the md5_sum_update bugfix).

svn path=/trunk/; revision=6314
2008-01-15 06:21:58 +00:00
Tim Janik
9318ab51dd Fixed copyright and credit for Asbjoern Pettersen.
svn path=/trunk/; revision=6297
2008-01-11 16:59:44 +00:00
12:55:19 Tim Janik
b07304fd89 added g_base64_encode()/g_base64_decode() test case by Asbjoern
2008-01-11 12:55:19  Tim Janik  <timj@imendio.com>

        * tests/testingbase64.c: added g_base64_encode()/g_base64_decode()
        test case by Asbjoern <asbgpe@online.no>. fixed up coding style.



svn path=/trunk/; revision=6292
2008-01-11 11:57:15 +00:00
Alexander Larsson
9c95329347 Add gio/gio.h include to check for c++ problems.
2008-01-08  Alexander Larsson  <alexl@redhat.com>

	* tests/cxx-test.C:
	Add gio/gio.h include to check for c++ problems.


svn path=/trunk/; revision=6280
2008-01-08 20:37:43 +00:00
Hans Breuer
1cda3c9e01 adapt to recent api changes variable declaration at the beginning of a
2007-12-09  Hans Breuer  <hans@breuer.org>

	* tests/gio-ls.c : adapt to recent api changes
	* tests/testglib.c : variable declaration at the beginning of a block
	
	(Lieven van der Heide, #503602)
	* win32-fixup.pl : process *.rc.in as well; substitute 
	LT_CURRENT_MINUS_AGE
	* glib/makefile.msc.in : alphabetic sorting of OBJECTS


svn path=/trunk/; revision=6184
2007-12-21 10:11:35 +00:00
Christian Persch
1ea515d019 Add g_checksum_type_get_length, and change g_checksum_get_digest to use a
2007-12-19  Christian Persch  <chpe@gnome.org>

	* glib/gchecksum.c: (g_checksum_type_get_length),
	(g_checksum_get_digest):
	* glib/gchecksum.h:
	* glib/glib.symbols:
	* tests/checksum-test.c: (test_checksum): Add
	g_checksum_type_get_length, and change g_checksum_get_digest to use a
	provided buffer instead of returning allocated memory. Bug #501853.

svn path=/trunk/; revision=6162
2007-12-19 18:53:27 +00:00
Emmanuele Bassi
a979c0d5a2 Fix the date validation check. (#503029)
2007-12-19  Emmanuele Bassi  <ebassi@gnome.org>

	* glib/gtimer.c (g_time_val_from_iso8601): Fix the date validation
	check. (#503029)

	* tests/testglib.c (various_string_tests): Add an invalid date
	for testing the above fix.

svn path=/trunk/; revision=6160
2007-12-19 17:28:38 +00:00
Matthias Clasen
d741d3e7a3 Add hash table iterators. (#500507, Jean-Yves Lefort)
2007-12-14  Matthias Clasen  <mclasen@redhat.com>

        * glib/glib.symbols:
        * glib/ghash.[hc]: Add hash table iterators.  (#500507,
        Jean-Yves Lefort)

        * tests/hash-test.c: Test iterators.



svn path=/trunk/; revision=6130
2007-12-15 03:54:09 +00:00
16:06:11 Tim Janik
0efd85aeac split up tests and reworked code to use the new test framework.
2007-12-12 16:06:11  Tim Janik  <timj@imendio.com>

        * tests/testglib.c: split up tests and reworked code to use
        the new test framework.

        * tests/Makefile.am: added testglib to TEST_PROGS.



svn path=/trunk/; revision=6103
2007-12-12 15:09:08 +00:00