~ubuntu-branches/ubuntu/trusty/gstreamer1.0/trusty

« back to all changes in this revision

Viewing changes to libs/gst/check/gstcheck.h

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2012-08-08 18:12:33 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20120808181233-riejwxprfsxh1njl
Tags: 0.11.93-1
* New upstream release:
  + debian/libgstreamer.symbols:
    - Update symbols file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
240
240
 * This macro checks that @a and @b are (almost) equal and aborts if this
241
241
 * is not the case, printing both expressions and the values they evaluated
242
242
 * to. This macro is for use in unit tests.
243
 
 *
244
 
 * Since: 0.10.14
245
243
 */
246
244
#define fail_unless_equals_float(a, b)                            \
247
245
G_STMT_START {                                                    \
261
259
 * This macro checks that @a and @b are (almost) equal and aborts if this
262
260
 * is not the case, printing both expressions and the values they evaluated
263
261
 * to. This macro is for use in unit tests.
264
 
 *
265
 
 * Since: 0.10.14
266
262
 */
267
263
#define assert_equals_float(a, b) fail_unless_equals_float(a, b)
268
264
 
490
486
#define ASSERT_BUFFER_REFCOUNT(buffer, name, value)             \
491
487
        ASSERT_MINI_OBJECT_REFCOUNT(buffer, name, value)
492
488
 
493
 
#define ASSERT_MEMORY_REFCOUNT(memory, name, value)             \
494
 
G_STMT_START {                                                  \
495
 
  int rc;                                                       \
496
 
  rc = memory->refcount;                                        \
497
 
  fail_unless (rc == value,                                     \
498
 
               name " (%p) refcount is %d instead of %d", memory, rc, value); \
499
 
} G_STMT_END
500
 
 
501
489
#define ASSERT_MINI_OBJECT_REFCOUNT(miniobj, name, value)       \
502
490
G_STMT_START {                                                  \
503
491
  int rc;                                                       \
536
524
 
537
525
#define _tcase_add_test __gst_tcase_add_test
538
526
 
 
527
/* add define to skip broken tests */
 
528
#define tcase_skip_broken_test(chain,test_func) \
 
529
  if (0) { tcase_add_test(chain,test_func); } else { \
 
530
    GST_ERROR ("FIXME: skipping test %s because it's broken.", G_STRINGIFY (test_func)); \
 
531
  }
 
532
 
539
533
G_END_DECLS
540
534
 
541
535
#endif /* __GST_CHECK_H__ */