glib/gio/tests
Dan Winship ce6fbd6231 Fix multiple bugs in g_srv_target_list_sort()
In particular, targets with weight 0 should be very UNlikely to be
selected, not very likely, as they were before. However, even ignoring
that bug in the logic, there was an additional bug (swapping list
items would cause the 0-weight items to get re-ordered incorrectly
anyway), and the code contained several fencepost errors.

This patch also adds gio/tests/srvtarget.c, which confirms that for a
sample list of targets, we now generate all possible correct random
sortings and no incorrect sortings, and the correct sortings occur in
roughly the expected proportions (though if the current code is
still wrong, those proportions may be wrong as well).

http://bugzilla.gnome.org/show_bug.cgi?id=583398
2009-06-01 14:31:48 -04:00
..
.gitignore GResolver wrappers: GNetworkAddress, GNetworkService, GSocketConnectable 2009-04-22 08:36:38 -04:00
buffered-input-stream.c Bug 562393 – g_buffered_input_stream_read_byte broken if data available 2008-11-28 05:57:07 +00:00
data-input-stream.c Revert behaviour change in g_data_input_stream_read_line 2008-12-01 19:02:58 +00:00
data-output-stream.c Use g_assert_error() and g_assert_no_error() 2008-09-27 01:43:43 +00:00
desktop-app-info.c 2.19.0 2008-10-16 23:59:50 +00:00
echo-server.c Add max_threads argument to g_threaded_socket_service_new 2009-05-18 08:47:49 +02:00
filter-streams.c Bug 568394 – dropping the last reference to a stream filter closes the 2009-01-21 14:09:56 +00:00
g-file-info.c don't define G_DISABLE_SINGLE_INCLUDES, it's in the global CPPFLAGS now. 2008-05-28 16:17:45 +00:00
g-file.c Fix broken test case. 2008-06-11 20:02:31 +00:00
g-icon.c Comment out two failing tests 2008-12-01 06:47:04 +00:00
httpd.c Add max_threads argument to g_threaded_socket_service_new 2009-05-18 08:47:49 +02:00
live-g-file.c Use G_GSSIZE_FORMAT where needed (#577884) 2009-05-20 14:17:27 +02:00
live-g-file.txt New GIO testing module working over real data 2008-02-06 13:52:07 +00:00
Makefile.am Fix multiple bugs in g_srv_target_list_sort() 2009-06-01 14:31:48 -04:00
memory-input-stream.c Use g_assert_error() and g_assert_no_error() 2008-09-27 01:43:43 +00:00
memory-output-stream.c Bug 540461 – g_memory_output_stream_get_data_size() doesn't behave as 2009-02-26 15:41:29 +00:00
readwrite.c Add tests for local GIOStream GFile ops 2009-05-13 14:42:57 +02:00
resolver.c GResolver wrappers: GNetworkAddress, GNetworkService, GSocketConnectable 2009-04-22 08:36:38 -04:00
send-data.c Add support for graceful disconnect to GTcpConnection 2009-05-20 11:19:47 +02:00
simple-async-result.c improve add new simple-async-result test new file to test 2009-01-05 06:58:22 +00:00
sleepy-stream.c Bug 568575 – _async functions for GDataInputStream 2009-01-28 16:39:39 +00:00
socket-client.c Add test apps for GSocket API 2009-05-15 10:08:18 +02:00
socket-server.c Read socket state in g_socket_get_local/remote_address 2009-05-19 10:40:27 +02:00
srvtarget.c Fix multiple bugs in g_srv_target_list_sort() 2009-06-01 14:31:48 -04:00
unix-streams.c Bug 505361 - gunixinputstream.c assumes poll() available 2008-09-26 16:19:35 +00:00