summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* build: Use AM_TESTS_ENVIRONMENT rather than TESTS_ENVIRONMENTPhilip Withnall2017-05-233-3/+3
| | | | | | | | | | | | TESTS_ENVIRONMENT is reserved for the user to be able to set when running the tests. AM_TESTS_ENVIRONMENT is for the tests’ Makefile to set itself. https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=782996
* Drop trailing semi-colon from G_DEFINE_ macroEmmanuele Bassi2017-04-106-17/+11
| | | | | | | | It's unnecessary, and only adds visual noise; we have been fairly inconsistent in the past, but the semi-colon-less version clearly dominates in the code base. https://bugzilla.gnome.org/show_bug.cgi?id=669355
* License headers: replace current FSF address by a link to gnu.orgSébastien Wilmet2017-01-041-4/+2
| | | | | | | Even if the address is correct, it's far more convenient to have a link to a website. https://bugzilla.gnome.org/show_bug.cgi?id=776586
* type-test: do not rely on signed integer overflow wrapping aroundSimon McVittie2016-12-021-3/+3
| | | | | | | | | | Signed integer overflow is undefined behaviour: if a compiler detects signed integer overflow, it is free to compile it to absolutely anything. Signed-off-by: Simon McVittie <smcv@debian.org> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510 Reviewed-by: Colin Walters
* tests/refcount/signals: don't shadow rand()Ross Burton2016-11-141-3/+3
| | | | | | | rand() is in the C library and some C libraries (uclibc, for example) end up with rand() defined even if stdlib.h isn't included explicitly. https://bugzilla.gnome.org/show_bug.cgi?id=774421
* unicode: Update test data files for unicode 9.0.0Rico Tzschichholz2016-09-212-3/+233
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=771591
* Update Unicode test data for Unicode 8Matthias Clasen2015-10-062-4/+429
| | | | These files are used by the unicode-caseconv test.
* tests: Don't test g_utf8_to_ucs4_fast too rigorouslyMatthias Clasen2015-09-071-7/+26
| | | | | | | The function is documented to assume valid input, and doesn't guarantee behavior with invalid input. So don't test that. https://bugzilla.gnome.org/show_bug.cgi?id=754636
* unicode-encoding test: Differentiate error messagesMatthias Clasen2015-09-071-1/+1
| | | | Spitting out the same error for different cases in not helpful.
* Drop binary checks when cross-compilingEmmanuele Bassi2015-09-011-13/+7
| | | | | | | | | | | | | | | | | | | | We don't need to run binaries we just built in order to successfully build GLib and friends any more. Since commit b74e2a7, we don't need to run glib-genmarshal when building GIO; since commit f9eb9eed, all our tests (including the ones that do need to run binaries we just built) are only built when running "make check", instead of unconditionally at every build. This means that we don't need to check for existing, native binaries when cross-compiling, and fail the configuration step if they are not found — which also means that you don't need to natively build GLib for your toolchain, in order to cross-compile GLib. We can also use the cross-compilation conditional, and skip those tests that require a binary we just built in order to build. https://bugzilla.gnome.org/show_bug.cgi?id=753745
* tests: replace most g_print() with g_printerr()Simon McVittie2015-05-112-92/+92
| | | | | | | | | | | | | | | | | | | | | I searched all files that mention g_test_run, and replaced most g_print() calls. This avoids interfering with TAP. Exceptions: * gio/tests/network-monitor: a manual mode that is run by "./network-monitor --watch" is unaffected * glib/gtester.c: not a test * glib/gtestutils.c: not a test * glib/tests/logging.c: specifically exercising g_print() * glib/tests/markup-parse.c: a manual mode that is run by "./markup-parse --cdata-as-text" is unaffected * glib/tests/testing.c: specifically exercising capture of stdout in subprocesses * glib/tests/utils.c: captures a subprocess's stdout * glib/tests/testglib.c: exercises an assertion failure in g_print() Bug: https://bugzilla.gnome.org/show_bug.cgi?id=725981 Reviewed-by: Colin Walters <walters@verbum.org> Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* testglib: my_hash_callback_remove_test: actually fail the testSimon McVittie2015-05-111-1/+1
| | | | | | | | | | The test is to remove all the odd values with my_hash_callback_remove(), then iterate over all values and verify that they are even. However, failing this check would just print "bad!" instead of failing the test. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=725981 Reviewed-by: Colin Walters <walters@verbum.org> Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* tests/gobject/performance: Clean up and add refcount performance testAlexander Larsson2014-07-301-10/+119
|
* unicode: Update test data files for unicode 7.0.0Christian Persch2014-06-292-8/+196
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=731929#c2
* all: remove use of 'register' keywordRyan Lortie2014-06-281-1/+1
| | | | | | We should have done this a decade ago... https://bugzilla.gnome.org/show_bug.cgi?id=730293
* assert-msg-test: Explicitly quit gdb session to avoid zombieDaniel Macks2014-06-101-0/+1
| | | | | | | | | gdb is run in batch mode, and can leave leave the program being executed/debugged running when the batchfile is finished. Explicitly "quit"ing the subprocess prevents it from leaving the stray subprocess when gdb finishes. https://bugzilla.gnome.org/show_bug.cgi?id=731366
* Fix the mapping test in continuousMatthias Clasen2014-05-301-0/+11
| | | | | | | It turns out that due to a recent gdm change, the inherited signal mask has SIGUSR1 blocked - which is bad news for tests using SIGUSR1. Fix the test by explicitly checking the signal mask before using SIGUSR1.
* Add more debug spew to the mapping-testMatthias Clasen2014-05-281-0/+7
|
* mapping-test: Add debug spewMatthias Clasen2014-05-271-0/+4
| | | | This might help figuring out why the test is failing in continuous.
* Try to fix mapping-testMatthias Clasen2014-05-221-7/+39
| | | | | | | The mapping-test is failing under gnome-continuous. I suspect this is simply due to running many tests in parallel, and mapping-test being racy. Replace the blind sleep by signals, to avoid the races.
* Restore executability for other filesColin Walters2014-01-312-0/+0
|
* Updated FSF's addressDaniel Mustieles2014-01-3140-120/+40
|
* Remove broken attempt at parsing date-onlyMatthias Clasen2014-01-011-1/+1
| | | | | | | | | | | g_time_val_from_iso8601 was attempting to parse strings having only a date, but failed to actually set the timeval despite returning TRUE. Since the docs state that the function only parses strings containing a date and a time, just return FALSE in this case. Also remove an incomplete testcase for this behaviour that was just checking the boolean return value, but not timeval.
* Use POSIX-specified <poll.h> over <sys/poll.h>Ryan Lortie2013-12-221-1/+1
| | | | | | | POSIX specifies that <poll.h> is the correct header to include for poll(), so let's do that instead. https://bugzilla.gnome.org/show_bug.cgi?id=141251
* sources: Fix leaks in testsStef Walter2013-12-151-2/+10
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711751
* Replace #ifdef HAVE_UNISTD_H checks with #ifdef G_OS_UNIXDan Winship2013-11-203-11/+6
| | | | | | | | | | | | | | | In Windows development environments that have it, <unistd.h> is mostly just a wrapper around several other native headers (in particular, <io.h>, which contains read(), close(), etc, and <process.h>, which contains getpid()). But given that some Windows dev environments don't have <unistd.h>, everything that uses those functions on Windows already needed to include the correct Windows header as well, and so there is never any point to including <unistd.h> on Windows. Also, remove some <unistd.h> includes (and a few others) that were unnecessary even on unix. https://bugzilla.gnome.org/show_bug.cgi?id=710519
* build: Give internal libraries higher precedenceMichael Haubenwallner2013-11-192-5/+5
| | | | | | | Linking local libraries too late may cause preinstalled libraries to get found earlier, due to external library paths in .la files. https://bugzilla.gnome.org/show_bug.cgi?id=712314
* threadpool-test: Fix leaks in testsStef Walter2013-11-111-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711751
* mainloop-test: Fix uninitialized memory access in testsStef Walter2013-11-111-3/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711751
* Revert "defaultiface: Fix leak in test"Stef Walter2013-11-111-4/+1
| | | | | | | This reverts commit fd7b2faa64febab407ffde2506c995544583a9d5. This required another patch to be commited first. Will put this back in bugzilla.
* tests/: Include unistd.h on *NIX onlyChun-wei Fan2013-11-1110-18/+34
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711047
* tests/: Avoid closing invalid fd'sChun-wei Fan2013-11-112-15/+18
| | | | | | | | | | | ...and only include unistd.h when we are on *NIX. Newer Visual C++ runtimes (8.0/2005 and later) will cause the program to crash with an internal abort() call when they detect instances of close() being called on an invalid fd, such as when the fd is -1, and these should be purged anyways. https://bugzilla.gnome.org/show_bug.cgi?id=711047
* timeloop: Fix leaks in testsStef Walter2013-11-111-0/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711751
* file-test: Fix leaks in testStef Walter2013-11-111-1/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711751
* defaultiface: Fix leak in testStef Walter2013-11-111-1/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711779
* timeloop-closure: Fix leaks in testStef Walter2013-11-111-4/+10
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711779
* signals: Fix leak in testStef Walter2013-11-111-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711779
* paramspec-test: Fix leaks in testsStef Walter2013-11-111-0/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711779
* override: Fix leaks in testStef Walter2013-11-111-0/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711779
* gvalue-test: Fix leaks in testStef Walter2013-11-111-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711779
* accumulator: Fix leak in testStef Walter2013-11-111-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711779
* module-test: Fix leaks in testStef Walter2013-11-101-1/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711768
* iochannel-test: Fix leaks in testStef Walter2013-11-101-1/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711751
* unicode-encoding: Fix leaks in testStef Walter2013-11-101-0/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711751
* thread-test: Fix leaks in testsStef Walter2013-11-101-1/+6
| | | | | | | This is a test of deprecated functionality and its age is showing. Doesn't actually do what it says. But fix leaks anyway. https://bugzilla.gnome.org/show_bug.cgi?id=711751
* mainloop-test: Fix leaks in testsStef Walter2013-11-101-0/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711751
* datetime: Fix leak in testStef Walter2013-11-101-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711751
* mapping-test: Fix leaks in testsStef Walter2013-11-101-2/+11
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711751
* gio-test: Fix leaks in testsStef Walter2013-11-101-0/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711751
* completion-test: Fix leaks in testsStef Walter2013-11-101-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711751