Commit Graph

17 Commits

Author SHA1 Message Date
Simon McVittie
32b0dd24e3 Add a SPDX LicenseRef for the license historically used for tests
Some of GLib's unit tests are under an apparently GLib-specific
permissive license, vaguely similar to the BSD/MIT family but with the
GPL's lack-of-warranty wording. This is not on SPDX's list of
well-known licenses, so we need to use a custom license name prefixed
with LicenseRef if we want to represent this in SPDX/REUSE syntax.

Most of the newer tests seem to be licensed under LGPL-2.1-or-later
instead.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-11-02 12:34:19 +00:00
Philip Withnall
7e9585177d tests: Drop use of g_test_bug_base()
Include the base URI in the `g_test_bug()` calls instead. This resolves
inconsistencies between the old bug base (bugzilla.gnome.org) and the
new bug base (gitlab.gnome.org). It also has the advantage that the URI
passed to `g_test_bug()` is now clickable in the code editor, rather
than being split across two locations.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/275#note_303175

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-05-13 22:16:27 +01:00
Dan Winship
578b657f95 gio/tests: add some more async stream tests
Add read_async() and skip_async() tests to buffered-input-stream.

Fix and re-enable filter-streams's existing close_async() tests, and
add read_async(), skip_async(), and write_async() tests as well. Also,
redo the tests to use dummy GFilterInputStream and GFilterOutputStream
subclasses rather than GBufferedInput/OutputStream, so that we're
testing the base filter stream implementations of everything (since
the buffered stream overrides are already getting tested in the
buffered-input-stream and buffered-output-stream tests anyway).

Add a skip_async() test to unix-streams. (This one would crash without
the bugfix in the previous commit.)
2013-01-16 10:17:15 -05:00
Colin Walters
753494a25e tests/buffered-input-stream: Fix size of parameter passed
buffer-size is guint, but the public API is gsize for some reason.

Tested-By: gustavold@linux.vnet.ibm.com

https://bugzilla.gnome.org/show_bug.cgi?id=687801
2012-11-07 09:51:20 -05:00
Ryan Lortie
1dc774a653 Remove g_type_init() calls
Very many testcases, some GLib tools (resource compiler, etc) and
GApplication were calling g_type_init().

Remove those uses, as they are no longer required.

https://bugzilla.gnome.org/show_bug.cgi?id=686161
2012-10-16 09:39:24 -04:00
Dan Winship
c37273dccb fix warnings 2012-04-30 09:28:42 -04:00
Maciej Piechotka
90739baec0 Make GBufferedInputStream implement GSeekable
https://bugzilla.gnome.org/show_bug.cgi?id=673034
2012-04-23 10:57:01 +02:00
Christian Persch
e4a6b1dcdc Plug a mem leak in buffered-input-stream test
==2429== 49 (24 direct, 25 indirect) bytes in 1 blocks are definitely lost in loss record 276 of 355
==2429==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==2429==    by 0x4057094: g_malloc (gmem.c:134)
==2429==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
==2429==    by 0x406F31B: g_slice_alloc0 (gslice.c:848)
==2429==    by 0x403A8A6: g_error_new_literal (gerror.c:117)
==2429==    by 0x403AC31: g_set_error_literal (gerror.c:314)
==2429==    by 0x4175525: g_buffered_input_stream_read_byte (gbufferedinputstream.c:880)
==2429==    by 0x804A21A: test_read_byte (buffered-input-stream.c:153)

Bug #628331.
2010-09-03 15:57:26 -04:00
Matthias Clasen
758c3216cd Improve coverage of stream tests 2010-07-30 19:51:20 -04:00
Matthias Clasen
2764b75d53 More stream tests 2010-07-05 23:13:17 -04:00
Matthias Clasen
10b2606af5 Add more checks 2010-07-05 23:13:16 -04:00
Matthias Clasen
4ab9b708c0 Add some more tests for the buffered read code 2010-07-05 23:13:16 -04:00
Matthias Clasen
fb120b5d87 Add a test for skipping 2010-07-04 20:51:06 -04:00
Paolo Borelli
cdf00a6a9b Add unit tests for some more methods 2009-12-08 17:05:09 +01:00
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
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
Matthias Clasen
0b715510de Bug 562393 – g_buffered_input_stream_read_byte broken if data available
2008-11-28  Matthias Clasen  <mclasen@redhat.com>

        Bug 562393 – g_buffered_input_stream_read_byte broken if data
        available

        * gio/gbufferedinputstream.c (g_buffered_input_stream_read_byte): Fix
        handling of buffered content.  Patch by Philip Withnall

        * gio/tests/buffered-input-stream.c: Add a testcase for this bug.
        * gio/tests/Makefile.am: And build it



svn path=/trunk/; revision=7686
2008-11-28 05:57:07 +00:00