Commit Graph

4784 Commits

Author SHA1 Message Date
Matthias Clasen
78c06eafe1 Don't refuse to encode a single byte. (Milan Crha)
2007-11-23  Matthias Clasen  <mclasen@redhat.com>

        * glib/gbase64.c (g_base64_encode): Don't refuse to encode
        a single byte.  (Milan Crha)

        * tests/base64-test.c: Test encoding short strings.



svn path=/trunk/; revision=5919
2007-11-23 17:58:00 +00:00
Daniel Nylander
39ad6fbd02 sv.po: Updated Swedish translation
svn path=/trunk/; revision=5918
2007-11-23 11:13:33 +00:00
Matthias Clasen
a1ac3c0e23 Define a two-argument macro C_() for marking translatable strings with
2007-11-23  Matthias Clasen  <mclasen@redhat.com>

        * glib/gi18n-lib.h:
        * glib/gi18n.h: Define a two-argument macro C_() for marking
        translatable strings with context and implement C_() and Q_()
        using g_dpgettext().  (#142676, Morten Welinder)

        * glib/glib.symbols:
        * glib/gstrfuncs.[hc]: Implement g_dpgettext().


svn path=/trunk/; revision=5917
2007-11-23 07:50:54 +00:00
Matthias Clasen
0d723a240e Use g_print to print out --help text in locale encoding. (#469551, Takao
2007-11-23  Matthias Clasen  <mclasen@redhat.com>

        * glib/goption.c: Use g_print to print out --help text in
        locale encoding.  (#469551, Takao Fujiwara)



svn path=/trunk/; revision=5916
2007-11-23 05:58:51 +00:00
Matthias Clasen
ccf93c8693 Set length out param in list-returning functions to 0 when returning NULL.
2007-11-22  Matthias Clasen  <mclasen@redhat.com>

        * glib/gkeyfile.c: Set length out param in list-returning functions
        to 0 when returning NULL.  (#498728, Christian Persch)



svn path=/trunk/; revision=5915
2007-11-23 04:17:58 +00:00
21:06:47 Tim Janik
1e55738f31 initialize automake variables EXTRA_DIST and TEST_PROGS for unconditional
2007-11-21 21:06:47  Tim Janik  <timj@imendio.com>

	* Makefile.decl: initialize automake variables EXTRA_DIST and
	TEST_PROGS for unconditional appending via += in other makefiles.
	define recursive test targets: test, test-report, perf-report,
	full-report, as described here:
      http://mail.gnome.org/archives/gtk-devel-list/2007-November/msg00000.html

	* Makefile.am:
	* build/win32/vs8/Makefile.am, build/win32/dirent/Makefile.am:
	* build/win32/Makefile.am, build/Makefile.am:
	* docs/Makefile.am, docs/reference/Makefile.am:
	* docs/reference/glib/Makefile.am, docs/reference/gobject/Makefile.am:
	* gmodule/Makefile.am, tests/Makefile.am:
	* tests/refcount/Makefile.am, tests/gobject/Makefile.am:
	* glib/update-pcre/Makefile.am, glib/libcharset/Makefile.am:
	* glib/tests/Makefile.am, glib/pcre/Makefile.am:
	* glib/gnulib/Makefile.am, gobject/Makefile.am, m4macros/Makefile.am:
	* gthread/Makefile.am, glib/Makefile.am:
	include $(top_srcdir)/Makefile.decl, adapted EXTRA_DIST assignments.

	* glib/tests/Makefile.am: removed example testing rules.

	* glib/tests/testing.c: conditionalized performance and slow tests.

	* glib/gtestutils.h:
	* glib/gtestutils.c: work around g_test_config_vars not changing its
	exported value after value assignments, aparently due to symbol aliases.

	* glib/gtester.c: fixed off-by-one error which produced junk in logs.

	* configure.in: check for python >= 2.4 and provide $PYTHON for scripts.


svn path=/trunk/; revision=5914
2007-11-21 20:09:46 +00:00
Yannig MARCHEGAY
49568d5f16 Updated Occitan translation
svn path=/trunk/; revision=5913
2007-11-20 21:12:06 +00:00
Tim Janik
a2bcee8f62 Fixed copyright for newly submitted files.
svn path=/trunk/; revision=5912
2007-11-20 17:35:26 +00:00
Tim Janik
fa9a420c8e ChangeLog: added GLib testing utility development history.
svn path=/trunk/; revision=5911
2007-11-20 15:01:04 +00:00
Tim Janik
6332518cc2 Renamed gtestframework to gtestutils.
* glib/glib.h:
* glib/Makefile.am: added gtestutils.h to public includes.

* glib/gtestutils.c: include gtestutils.h.

* glib/gtestutils.h:
* glib/glib.symbols:
* glib/tests/testing.c: renamed gtestframework to gtestutils.

* glib/gtestframework.h: renamed to gtestutils.h.

* glib/gtestframework.c: renamed to gtestutils.c.

svn path=/trunk/; revision=5910
2007-11-20 15:01:02 +00:00
Tim Janik
0324be2048 glib/gtestframework.c: g_test_init(): make warnings and criticals fatal for all test programs.
svn path=/trunk/; revision=5909
2007-11-20 15:01:00 +00:00
Tim Janik
d3c69f19a2 gtestframework.c: added test API documentation by Sven Herzberg and Tim Janik.
svn path=/trunk/; revision=5908
2007-11-20 15:00:59 +00:00
Tim Janik
f3d2520702 gtestframework.[hc]: implemented g_test_queue_destroy() and g_test_queue_unref().
svn path=/trunk/; revision=5907
2007-11-20 15:00:57 +00:00
Tim Janik
515c53474a Added g_test_bug() and related API.
* gtester.c: handle G_TEST_LOG_MESSAGE and test test message API.

* gtestframework.h, gtestframework.c: added test message API and convenience
API to send test messages about bug URLs.

svn path=/trunk/; revision=5906
2007-11-20 15:00:56 +00:00
Tim Janik
a0409304dc Added API to access test framework configuration.
* gtestframework.h, gtestframework.c: export testing configuration to test
programs with g_test_quick(), g_test_perf(), g_test_verbose(), g_test_quiet().

svn path=/trunk/; revision=5905
2007-11-20 15:00:54 +00:00
Tim Janik
a46a52941b gtester: implemented logic to handle failing tests, self tests, and validate XML reports.
* gtester.c: terminate when tests failed. keep XML valid when test cases fail.
restart test binaries when tests fail, resuming after the last processed test.
support --gtester-selftest to run gtester itself as test program.
support --test-arg=<arg> to pass args along to test programs. added
main_selftest() which does a simplistic fixture test. fail if exit
code of test programs is not 0.

* gtestframework.h: added G_TEST_LOG_SKIP_CASE test log message type.

* gtestframework.c: support --GTestSkipCount=<n> to skip a number of tests.

* tests/Makefile.am: added test-report: for demonstration purposes.
added gtester-xmllint-check: and hooked it up into check:, this rule calls
gtester as test program, running it's selftest, and then uses xmllint to
validate the generate XML test log file.

svn path=/trunk/; revision=5904
2007-11-20 15:00:53 +00:00
Tim Janik
f347900eaf gtester: implemented XML logging.
* glib/gtester.c: log test messages to XML output file. beautified normal test
result output.

* glib/gtestframework.c: fixed GTimer leak.

* glib/tests/Makefile.am: start gtester with --verbose.

svn path=/trunk/; revision=5903
2007-11-20 15:00:51 +00:00
Tim Janik
6bc38c46e7 tests/Makefile.am: execute test programs with gtester, add test: to check:
svn path=/trunk/; revision=5902
2007-11-20 15:00:50 +00:00
Tim Janik
f843b379d0 Fixed PLT symbol exports for gtestframework.h.
* glib/glib.symbols: added all exported gtestframework.h symbols.

* glib/gtestframework.c: include galias.h, galiasdef.c, define __G_TESTFRAMEWORK_C__.

svn path=/trunk/; revision=5901
2007-11-20 15:00:48 +00:00
Tim Janik
2b7dbd9aab glib/gtester.c: fixed debugging flag.
svn path=/trunk/; revision=5900
2007-11-20 15:00:47 +00:00
Tim Janik
bca1fe406e fixed bogus unistd.h include.
svn path=/trunk/; revision=5899
2007-11-20 15:00:46 +00:00
Tim Janik
22ac72234a Implemented test log IPC.
* gtester.c: read and decode log messages from test binary child processes.
fixed GIOChannel and child watch handling to process all messages and avoid
hangs. pass --verbose and --quiet on to children, default to --quiet.

* gtestframework.h: export g_test_log_type_name().

* gtestframework.c: send test log to --GTestLogFD=<fd> if given, removed
bogus -o-option.

svn path=/trunk/; revision=5898
2007-11-20 15:00:45 +00:00
Tim Janik
add119f8e1 gtester.c: support test case listing through gtester.
svn path=/trunk/; revision=5897
2007-11-20 15:00:44 +00:00
Tim Janik
a7dc2ea272 gtestframework.c: fixed testpath matches for automatic root suite.
svn path=/trunk/; revision=5896
2007-11-20 15:00:43 +00:00
Tim Janik
d0709d04cb gtester.c: adapted to become a rudimentary test binary launcher.
* gtester.c: increased read buffer size to match common unix pipe buffer size.
added argument parsing and usage. changed io handling to capture and replicate
stdout. fixed io handlers to be cleaned up when the child process exits (catch
G_IO_ERR | G_IO_HUP). we now use pending/iteration instead of a main loop
structure, to keep running until the child process exits and all io has been
processed. launch the test binaries given on the command line. don't quit when
a child couldn't be launched but --keep-going was specified.

svn path=/trunk/; revision=5895
2007-11-20 15:00:41 +00:00
Tim Janik
39cf400cdf Integrated gtester program into build process.
* Makefile.am: build and install gtester binary.

* gtester.c: fixed up coding style and removed hard wired test coded.

svn path=/trunk/; revision=5894
2007-11-20 15:00:40 +00:00
Tim Janik
bf51c15b89 glib/gtester.c:Small -Wall fix
svn path=/trunk/; revision=5893
2007-11-20 15:00:39 +00:00
Tim Janik
26988f5776 glib/gtester.c:Implemented nonblocking reading properly now
svn path=/trunk/; revision=5892
2007-11-20 15:00:38 +00:00
Tim Janik
a09ee4dc20 glib/gtester.c:Quit the application when the output is parsed completely, not just the process finished
svn path=/trunk/; revision=5891
2007-11-20 15:00:37 +00:00
Tim Janik
dce1a63bf4 glib/gtester.c:Read the output of the child process
svn path=/trunk/; revision=5890
2007-11-20 15:00:36 +00:00
Tim Janik
e413112683 glib/gtester.c:Use g_spawn_async_with_pipes()
svn path=/trunk/; revision=5889
2007-11-20 15:00:35 +00:00
Tim Janik
0217653b80 glib/gtester.c:Spawn a process async and quit gtester after the child process exited
svn path=/trunk/; revision=5888
2007-11-20 15:00:34 +00:00
Tim Janik
66bef13e6f glib/gtester.c:Added a first revision of gtester
svn path=/trunk/; revision=5887
2007-11-20 15:00:33 +00:00
Tim Janik
25053dc518 Implemented test log serialization.
* glib/gtestframework.h: added g_test_log*() API.

* glib/gtestframework.c: implement test log serialization.

svn path=/trunk/; revision=5886
2007-11-20 15:00:32 +00:00
Tim Janik
e3c66f03e0 Implemented test logging basics.
* glib/gtestframework.c: added --debug-log and --verbose, implemented
test information logging.

* testing.c: test g_test_maximized_result() and g_test_minimized_result().

svn path=/trunk/; revision=5885
2007-11-20 15:00:31 +00:00
Tim Janik
6145aaca50 Implemented g_test_timer*().
* gtestframework.c: implemented g_test_timer*().

* tests/testing.c: added a g_test_timer*() test.

svn path=/trunk/; revision=5884
2007-11-20 15:00:30 +00:00
Tim Janik
ba166c0081 Implemented support for testpaths.
* gtestframework.c: implemented g_test_add_vtable() and g_test_add_func().

* tests/testing.c: use g_test_add() and g_test_add_func() to majorly simplify main().

svn path=/trunk/; revision=5883
2007-11-20 15:00:29 +00:00
Tim Janik
b2a4c8bae2 testing.c: added tests for the g_test_rand*() API.
svn path=/trunk/; revision=5882
2007-11-20 15:00:28 +00:00
Tim Janik
e47c4253f9 Implemented g_test_rand*().
* gtestframework.h: fixed g_assert_cmp*() to evaluate arguments only once.
added g_assert_cmpuint(). completed g_test_rand*() to cover bits, ints,
doubles and ranges.

* gtestframework.c: fixed "--seed" option and implemented g_test_rand*().

svn path=/trunk/; revision=5881
2007-11-20 15:00:27 +00:00
Tim Janik
fcf30698fe testing.c: added tests for g_assert_cmphex() and forked test traps.
svn path=/trunk/; revision=5880
2007-11-20 15:00:26 +00:00
Tim Janik
f1d751b76e Implemented g_test_trap_fork() API.
* gtestframework.h: added g_assert_cmphex(). reworked g_test_trap*() API.

* gtestframework.c: implemented g_test_trap_fork() API.

svn path=/trunk/; revision=5879
2007-11-20 15:00:25 +00:00
Tim Janik
ca1c42405e that match a given test path. (g_test_run_suite): run suite only if it
* glib/gtestframework.c:

that match a given test path.
(g_test_run_suite): run suite only if it matches the existing test paths.

* glib/tests/testing.c: minor rename.

svn path=/trunk/; revision=5878
2007-11-20 15:00:24 +00:00
Tim Janik
cc3bf40d26 GTest framework started.
* glib/gtestframework.h: testing framework API as proposed on gtk-devel-list.
includes elaborate assertions, performance report functions, test traps,
test timer, test random numbers, teardoiwn garbage collection functions
and general test case / test suite management APIs.

* glib/gtestframework.c: first test framework implementation. already covers
some test suite management APIs and assertion message implementations.

* glib/tests/testing.c: test program for the testing framework.

* glib/tests/Makefile.am: complie testing.c as test. run all tests as part of
make test:.

svn path=/trunk/; revision=5877
2007-11-20 15:00:23 +00:00
Tim Janik
edfef23665 glib/Makefile.am: build tests/ subdir after building libglib.
svn path=/trunk/; revision=5876
2007-11-20 15:00:21 +00:00
Tim Janik
78373b68b9 Fixed up internal 'g_test*' names.
* refcount/signals.c:
* refcount/objects.c:
* refcount/objects2.c:
* refcount/closures.c:
* refcount/properties.c:
* refcount/properties2.c: changed namespace prefix from g_test_* to my_test_*
to not clash with newly introduced g_test* API in glib.

svn path=/trunk/; revision=5875
2007-11-20 15:00:20 +00:00
Tim Janik
f0187b0a1b Added gtestframework.[hc] and glib/tests/.
svn path=/trunk/; revision=5874
2007-11-20 15:00:19 +00:00
Sven Neumann
d07f85e11e use g_strconcat() instead of g_strjoin() to concatenate two strings.
2007-11-20  Sven Neumann  <sven@gimp.org>

	* glib/gerror.c (g_error_add_prefix): use g_strconcat() instead of
	g_strjoin() to concatenate two strings.

svn path=/trunk/; revision=5873
2007-11-20 10:46:15 +00:00
Priit Laes
3bbc6f8fe3 Translation updated by Ivar Smolin.
2007-11-19  Priit Laes  <plaes@svn.gnome.org>

	* et.po: Translation updated by Ivar Smolin.

svn path=/trunk/; revision=5872
2007-11-19 15:51:48 +00:00
Marco Barisione
cd238e4869 Forgot to say that the last commit fixed bug #498113 (Kouhei Sutou)
svn path=/trunk/; revision=5870
2007-11-19 14:08:20 +00:00
Marco Barisione
9f86f44826 Pass an unsigned long instead of an int to pcre_fullinfo() to avoid
2007-11-19  Marco Barisione  <marco@barisione.org>

	* glib/gregex.c: Pass an unsigned long instead of an int to
	pcre_fullinfo() to avoid problems on 64-bit systems

svn path=/trunk/; revision=5869
2007-11-19 14:06:18 +00:00