mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-24 22:12:16 +02:00 
			
		
		
		
	GMappedFile: improve test coverage
This commit is contained in:
		| @@ -5,6 +5,22 @@ | |||||||
| #include <unistd.h> | #include <unistd.h> | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | static void | ||||||
|  | test_basic (void) | ||||||
|  | { | ||||||
|  |   GMappedFile *file; | ||||||
|  |   GError *error; | ||||||
|  |  | ||||||
|  |   error = NULL; | ||||||
|  |   file = g_mapped_file_new (SRCDIR "/empty", FALSE, &error); | ||||||
|  |   g_assert_no_error (error); | ||||||
|  |  | ||||||
|  |   g_mapped_file_ref (file); | ||||||
|  |   g_mapped_file_unref (file); | ||||||
|  |  | ||||||
|  |   g_mapped_file_unref (file); | ||||||
|  | } | ||||||
|  |  | ||||||
| static void | static void | ||||||
| test_empty (void) | test_empty (void) | ||||||
| { | { | ||||||
| @@ -75,6 +91,7 @@ main (int argc, char *argv[]) | |||||||
| { | { | ||||||
|   g_test_init (&argc, &argv, NULL); |   g_test_init (&argc, &argv, NULL); | ||||||
|  |  | ||||||
|  |   g_test_add_func ("/mappedfile/basic", test_basic); | ||||||
|   g_test_add_func ("/mappedfile/empty", test_empty); |   g_test_add_func ("/mappedfile/empty", test_empty); | ||||||
|   g_test_add_func ("/mappedfile/nonexisting", test_nonexisting); |   g_test_add_func ("/mappedfile/nonexisting", test_nonexisting); | ||||||
|   g_test_add_func ("/mappedfile/writable", test_writable); |   g_test_add_func ("/mappedfile/writable", test_writable); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user