* Boston, MA 02111-1307, USA.
*/
+/* We are testing some deprecated APIs here */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include <glib.h>
static gint value_create_count = 0;
* if advised of the possibility of such damage.
*/
+/* We are testing some deprecated APIs here */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include <glib.h>
static GCond cond;
#undef G_DISABLE_ASSERT
#undef G_LOG_DOMAIN
+/* We are testing some deprecated APIs here */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include "glib.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
+
+/* We are testing some deprecated APIs here */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include <glib.h>
#include <glib/gstdio.h>
--- /dev/null
+/* Unit tests for GMainLoop
+ * Copyright (C) 2011 Red Hat, Inc
+ * Author: Matthias Clasen
+ *
+ * This work is provided "as is"; redistribution and modification
+ * in whole or in part, in any medium, physical or electronic is
+ * permitted without restriction.
+ *
+ * This work is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * In no event shall the authors or contributors be liable for any
+ * direct, indirect, incidental, special, exemplary, or consequential
+ * damages (including, but not limited to, procurement of substitute
+ * goods or services; loss of use, data, or profits; or business
+ * interruption) however caused and on any theory of liability, whether
+ * in contract, strict liability, or tort (including negligence or
+ * otherwise) arising in any way out of the use of this software, even
+ * if advised of the possibility of such damage.
+ */
+
+#include <glib.h>
+
+static void
+test_unref (void)
+{
+}
+
+int
+main (int argc, char *argv[])
+{
+ g_test_init (&argc, &argv, NULL);
+
+ g_test_add_func ("/mainloop/unref", test_unref);
+
+ return g_test_run ();
+}
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include <config.h>
#include <glib.h>
#include <string.h>
* if advised of the possibility of such damage.
*/
+/* We are testing some deprecated APIs here */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include <glib.h>
#include <stdio.h>
shared = 0;
for (i = 0; i < THREADS; i++)
- threads[i] = g_thread_create (thread_func, NULL, TRUE, NULL);
+ threads[i] = g_thread_new ("once3", thread_func, NULL, TRUE, NULL);
for (i = 0; i < THREADS; i++)
g_thread_join (threads[i]);
* if advised of the possibility of such damage.
*/
+/* We are testing some deprecated APIs here */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include <glib.h>
/* test basics:
{
g_test_init (&argc, &argv, NULL);
- g_assert (g_thread_get_initialized ());
-
g_test_add_func ("/thread/private1", test_private1);
g_test_add_func ("/thread/private2", test_private2);
g_test_add_func ("/thread/private3", test_private3);
* if advised of the possibility of such damage.
*/
+/* We are testing some deprecated APIs here */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include <glib.h>
#include <stdio.h>
* if advised of the possibility of such damage.
*/
+/* We are testing some deprecated APIs here */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include <glib.h>
static void
file = g_mapped_file_new ("4096-random-bytes", TRUE, NULL);
after = g_mapped_file_new ("4096-random-bytes", TRUE, NULL);
- g_mapped_file_free (before);
- g_mapped_file_free (after);
+ g_mapped_file_unref (before);
+ g_mapped_file_unref (after);
g_assert (file != NULL);
g_assert_cmpint (g_mapped_file_get_length (file), ==, 4096);
g_free (tmp2);
g_free (tmp);
- g_mapped_file_free (file);
+ g_mapped_file_unref (file);
}
static void
* if advised of the possibility of such damage.
*/
+/* We are testing some deprecated APIs here */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include <stdio.h>
#include <string.h>
#include "glib.h"
{
g_test_init (&argc, &argv, NULL);
- g_assert (g_thread_get_initialized ());
-
g_test_add_func ("/thread/thread1", test_thread1);
g_test_add_func ("/thread/thread2", test_thread2);
g_test_add_func ("/thread/thread3", test_thread3);
#undef G_DISABLE_ASSERT
#undef G_LOG_DOMAIN
+/* We are testing some deprecated APIs here */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include <stdio.h>
#include <string.h>
#include "glib.h"
* Author: Matthias Clasen, Behdad Esfahbod
*/
+/* We are testing some deprecated APIs here */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include "glib.h"
static void