1 /* µTest 2 * 3 * Copyright 2019 Emmanuele Bassi 4 * 5 * SPDX-License-Identifier: MIT 6 */ 7 8 #pragma once 9 10 #ifdef __cplusplus 11 # define MUTEST_BEGIN_DECLS extern "C" { 12 # define MUTEST_END_DECLS } 13 #else 14 # define MUTEST_BEGIN_DECLS 15 # define MUTEST_END_DECLS 16 #endif 17 18 #ifndef MUTEST_PUBLIC 19 # define MUTEST_PUBLIC extern 20 #endif 21 22 #include <stdbool.h> 23 #include <stdint.h> 24 #include <stdlib.h> 25 26 #if defined(__GNUC__) && __GNUC__ >= 4 27 # define MUTEST_NULL_TERMINATED \ 28 __attribute__((__sentinel__)) 29 #else 30 # define MUTEST_NULL_TERMINATED 31 #endif 32 33 #ifdef __GNUC__ 34 # define MUTEST_NO_RETURN \ 35 __attribute__((__noreturn__)) 36 #else 37 # define MUTEST_NO_RETURN 38 #endif 39 40 #ifdef __GNUC__ 41 # define MUTEST_UNUSED \ 42 __attribute__((unused)) 43 #else 44 # define MUTEST_UNUSED 45 #endif 46 47 MUTEST_BEGIN_DECLS 48 49 /* {{{ Types */ 50 51 /** 52 * mutest_suite_t: 53 * 54 * An opaque structure representing a test suite. 55 */ 56 typedef struct _mutest_suite_t mutest_suite_t; 57 58 /** 59 * mutest_spec_t: 60 * 61 * An opaque structure representing a spec. 62 */ 63 typedef struct _mutest_spec_t mutest_spec_t; 64 65 /** 66 * mutest_expect_t: 67 * 68 * An opaque structure representing an expectation. 69 */ 70 typedef struct _mutest_expect_t mutest_expect_t; 71 72 /** 73 * mutest_expect_res_t: 74 * 75 * An opaque structure representing the result of an expectation. 76 */ 77 typedef struct _mutest_expect_res_t mutest_expect_res_t; 78 79 /** 80 * mutest_describe_func_t: 81 * @suite: a #mutest_suite_t 82 * 83 * The prototype of a function to pass to mutest_describe(). 84 */ 85 typedef void (* mutest_describe_func_t) (mutest_suite_t *suite); 86 87 /** 88 * mutest_spec_func_t: 89 * @spec: a #mutest_spec_t 90 * 91 * The prototype of a function to pass to mutest_it(). 92 */ 93 typedef void (* mutest_spec_func_t) (mutest_spec_t *spec); 94 95 /** 96 * mutest_matcher_func_t: 97 * @e: a #mutest_expect_t 98 * @check: the #mutest_expect_res_t to check against @e 99 * 100 * The prototype of a function to pass to mutest_expect(). 101 * 102 * Returns: true if @check matches the value in @e. 103 */ 104 typedef bool (* mutest_matcher_func_t) (mutest_expect_t *e, 105 mutest_expect_res_t *check); 106 107 /** 108 * mutest_hook_func_t: 109 * 110 * The prototype of a function to pass to mutest_before(), mutest_before_each(), 111 * mutest_after_each(), and mutest_after(). 112 */ 113 typedef void (* mutest_hook_func_t) (void); 114 115 /* }}} */ 116 117 /* {{{ Value wrappers */ 118 119 /** 120 * mutest_bool_value: 121 * @value: a boolean scalar 122 * 123 * Wraps a boolean value to pass to mutest_expect(). 124 * 125 * Returns: a newly allocated #mutest_expect_res_t 126 */ 127 MUTEST_PUBLIC 128 mutest_expect_res_t * 129 mutest_bool_value (bool value); 130 131 /** 132 * mutest_get_bool_value: 133 * @res: a #mutest_expect_res_t 134 * 135 * Retrieves the boolean value in the result wrapper. 136 * 137 * Returns: a boolean value 138 */ 139 MUTEST_PUBLIC 140 bool 141 mutest_get_bool_value (const mutest_expect_res_t *res); 142 143 /** 144 * mutest_int_value: 145 * @value: an integer scalar 146 * 147 * Wraps an integer value to pass to mutest_expect(). 148 * 149 * Returns: a newly allocated #mutest_expect_res_t 150 */ 151 MUTEST_PUBLIC 152 mutest_expect_res_t * 153 mutest_int_value (int value); 154 155 /** 156 * mutest_get_int_value: 157 * @res: a #mutest_expect_res_t 158 * 159 * Retrieves the integer value in the result wrapper. 160 * 161 * Returns: an integer value 162 */ 163 MUTEST_PUBLIC 164 int 165 mutest_get_int_value (const mutest_expect_res_t *res); 166 167 /** 168 * mutest_string_value: 169 * @value: a C string 170 * 171 * Wraps a C string to pass to mutest_expect(). 172 * 173 * Returns: a newly allocated #mutest_expect_res_t 174 */ 175 MUTEST_PUBLIC 176 mutest_expect_res_t * 177 mutest_string_value (const char *value); 178 179 /** 180 * mutest_get_string_value: 181 * @res: a #mutest_expect_res_t 182 * 183 * Retrieves the string in the result wrapper. 184 * 185 * Returns: a string 186 */ 187 MUTEST_PUBLIC 188 const char * 189 mutest_get_string_value (const mutest_expect_res_t *res); 190 191 /** 192 * mutest_float_value: 193 * @value: a floating point scalar 194 * 195 * Wraps a floating point value to pass to mutest_expect(). 196 * 197 * Returns: a newly allocated #mutest_expect_res_t 198 */ 199 MUTEST_PUBLIC 200 mutest_expect_res_t * 201 mutest_float_value (double value); 202 203 /** 204 * mutest_get_float_value: 205 * @res: a #mutest_expect_res_t 206 * 207 * Retrieves the floating pointer value in the result wrapper. 208 * 209 * Returns: a floating point value 210 */ 211 MUTEST_PUBLIC 212 double 213 mutest_get_float_value (const mutest_expect_res_t *res); 214 215 /** 216 * mutest_int_range: 217 * @min: the minimum value of a range 218 * @max: the maximum value of a range 219 * 220 * Wraps a range of integers between @min and @max, inclusive, 221 * to pass to mutest_expect(). 222 * 223 * Returns: a newly allocated #mutest_expect_res_t 224 */ 225 MUTEST_PUBLIC 226 mutest_expect_res_t * 227 mutest_int_range (int min, 228 int max); 229 230 /** 231 * mutest_get_int_range: 232 * @res: a #mutest_expect_res_t 233 * @min: return location for the minimum value of the range 234 * @max: return location for the maximum value of the range 235 * 236 * Retrieves the range in the result wrapper. 237 */ 238 MUTEST_PUBLIC 239 void 240 mutest_get_int_range (const mutest_expect_res_t *res, 241 int *min, 242 int *max); 243 244 /** 245 * mutest_float_range: 246 * @min: the minimum value of a range 247 * @max: the maximum value of a range 248 * 249 * Wraps a range of floating point values between @min and @max, 250 * inclusive, to pass to mutest_expect(). 251 * 252 * Returns: a newly allocated #mutest_expect_res_t 253 */ 254 MUTEST_PUBLIC 255 mutest_expect_res_t * 256 mutest_float_range (double min, 257 double max); 258 259 /** 260 * mutest_get_float_range: 261 * @res: a #mutest_expect_res_t 262 * @min: return location for the minimum value of the range 263 * @max: return location for the maximum value of the range 264 * 265 * Retrieves the range in the result wrapper. 266 */ 267 MUTEST_PUBLIC 268 void 269 mutest_get_float_range (const mutest_expect_res_t *res, 270 double *min, 271 double *max); 272 273 /** 274 * mutest_pointer: 275 * @pointer: a generic pointer 276 * 277 * Wraps a pointer to pass to mutest_expect(). 278 * 279 * Returns: a newly allocated #mutest_expect_res_t 280 */ 281 MUTEST_PUBLIC 282 mutest_expect_res_t * 283 mutest_pointer (const void *pointer); 284 285 /** 286 * mutest_get_pointer: 287 * @res: a #mutest_expect_res_t 288 * 289 * Retrieves the pointer value in the result wrapper. 290 * 291 * Returns: a pointer value 292 */ 293 MUTEST_PUBLIC 294 const void * 295 mutest_get_pointer (const mutest_expect_res_t *res); 296 297 /* }}} */ 298 299 /* {{{ Matchers */ 300 301 /** 302 * mutest_not: 303 * @e: a #mutest_expect_t 304 * @check: a #mutest_expect_res_t to check agains @e 305 * 306 * Negates the check performed by the next #mutest_expect_func_t. 307 * 308 * Returns: true if #mutest_expect_func_t returns false, 309 * and vice versa 310 */ 311 MUTEST_PUBLIC 312 bool 313 mutest_not (mutest_expect_t *e, 314 mutest_expect_res_t *check); 315 316 /** 317 * mutest_skip: 318 * @e: a #mutest_expect_t 319 * @check: a #mutest_expect_res_t to check against @e 320 * 321 * Unconditionally skips the expectation. 322 * 323 * Returns: always true 324 */ 325 MUTEST_PUBLIC 326 bool 327 mutest_skip (mutest_expect_t *e, 328 mutest_expect_res_t *check); 329 330 /** 331 * mutest_to_be_true: 332 * @e: a #mutest_expect_t 333 * @check: a #mutest_expect_res_t 334 * 335 * Unconditionally checks that the value in @e is true. 336 * 337 * Returns: true if the value is true 338 * 339 * See also: mutest_to_be() 340 */ 341 MUTEST_PUBLIC 342 bool 343 mutest_to_be_true (mutest_expect_t *e, 344 mutest_expect_res_t *check); 345 346 /** 347 * mutest_to_be_false: 348 * @e: a #mutest_expect_t 349 * @check: a #mutest_expect_res_t 350 * 351 * Unconditionally checks that the value in @e is false. 352 * 353 * Returns: true if the value is false 354 * 355 * See also: mutest_to_be() 356 */ 357 MUTEST_PUBLIC 358 bool 359 mutest_to_be_false (mutest_expect_t *e, 360 mutest_expect_res_t *check); 361 362 /** 363 * mutest_to_be_null: 364 * @e: a #mutest_expect_t 365 * @check: a #mutest_expect_res_t 366 * 367 * Unconditionally checks that the value in @e is %NULL. 368 * 369 * Returns: true if the value is %NULL 370 * 371 * See also: mutest_to_be() 372 */ 373 MUTEST_PUBLIC 374 bool 375 mutest_to_be_null (mutest_expect_t *e, 376 mutest_expect_res_t *check); 377 378 /** 379 * mutest_to_be: 380 * @e: a #mutest_expect_t 381 * @check: a #mutest_expect_res_t 382 * 383 * Compares the value in @e with the value in @check, if their 384 * types match. 385 * 386 * Returns: true if the values are equal 387 */ 388 MUTEST_PUBLIC 389 bool 390 mutest_to_be (mutest_expect_t *e, 391 mutest_expect_res_t *check); 392 393 /** 394 * mutest_to_be_close_to: 395 * @e: a #mutest_expect_t 396 * @check: a #mutest_expect_res_t 397 * 398 * Checks if the numeric value in @e is within a specified tolerance 399 * of the expected value in @check. 400 * 401 * Returns: true if the values are near each other 402 */ 403 MUTEST_PUBLIC 404 bool 405 mutest_to_be_close_to (mutest_expect_t *e, 406 mutest_expect_res_t *check); 407 408 /** 409 * mutest_to_be_nan: 410 * @e: a #mutest_expect_t 411 * @check: a #mutest_expect_res_t 412 * 413 * Checks if the floating point value in @e is NaN (not a number). 414 * 415 * Returns: true if the value is NaN 416 */ 417 MUTEST_PUBLIC 418 bool 419 mutest_to_be_nan (mutest_expect_t *e, 420 mutest_expect_res_t *check); 421 422 /** 423 * mutest_to_be_positive_infinity: 424 * @e: a #mutest_expect_t 425 * @check: a #mutest_expect_res_t 426 * 427 * Checks if the floating point value in @e is a positive infinity. 428 * 429 * Returns: true if the value is the expected positive infinity 430 */ 431 MUTEST_PUBLIC 432 bool 433 mutest_to_be_positive_infinity (mutest_expect_t *e, 434 mutest_expect_res_t *check); 435 436 /** 437 * mutest_to_be_negative_infinity: 438 * @e: a #mutest_expect_t 439 * @check: a #mutest_expect_res_t 440 * 441 * Checks if the floating point value in @e is a negative infinity. 442 * 443 * Returns: true if the value is the expected negative infinity 444 */ 445 MUTEST_PUBLIC 446 bool 447 mutest_to_be_negative_infinity (mutest_expect_t *e, 448 mutest_expect_res_t *check); 449 450 /** 451 * mutest_to_be_greater_than: 452 * @e: a #mutest_expect_t 453 * @check: a #mutest_expect_res_t 454 * 455 * Checks if the numeric value in @e is greater than the value in @check. 456 * 457 * Returns: true if the value is greater than the expected value 458 */ 459 MUTEST_PUBLIC 460 bool 461 mutest_to_be_greater_than (mutest_expect_t *e, 462 mutest_expect_res_t *check); 463 464 /** 465 * mutest_to_be_greater_than_or_equal: 466 * @e: a #mutest_expect_t 467 * @check: a #mutest_expect_res_t 468 * 469 * Checks if the numeric value in @e is greater than or equal to 470 * the value in @check. 471 * 472 * Returns: true if the value is greater than or equal to the expected value 473 */ 474 MUTEST_PUBLIC 475 bool 476 mutest_to_be_greater_than_or_equal (mutest_expect_t *e, 477 mutest_expect_res_t *check); 478 479 /** 480 * mutest_to_be_less_than_or_equal: 481 * @e: a #mutest_expect_t 482 * @check: a #mutest_expect_res_t 483 * 484 * Checks if the numeric value in @e is less than or equal to 485 * the value in @check. 486 * 487 * Returns: true if the value is less than or equal to the expected value 488 */ 489 MUTEST_PUBLIC 490 bool 491 mutest_to_be_less_than_or_equal (mutest_expect_t *e, 492 mutest_expect_res_t *check); 493 494 /** 495 * mutest_to_be_less_than: 496 * @e: a #mutest_expect_t 497 * @check: a #mutest_expect_res_t 498 * 499 * Checks if the numeric value in @e is less than the value in @check. 500 * 501 * Returns: true if the value is less than the expected value 502 */ 503 MUTEST_PUBLIC 504 bool 505 mutest_to_be_less_than (mutest_expect_t *e, 506 mutest_expect_res_t *check); 507 508 /** 509 * mutest_to_be_in_range: 510 * @e: a #mutest_expect_t 511 * @check: a #mutest_expect_res_t 512 * 513 * Checks if the numeric value in @e is inside the range in @check. 514 * 515 * Returns: true if the value is inside the expected range 516 */ 517 MUTEST_PUBLIC 518 bool 519 mutest_to_be_in_range (mutest_expect_t *e, 520 mutest_expect_res_t *check); 521 522 /** 523 * mutest_to_contain: 524 * @e: a #mutest_expect_t 525 * @check: a #mutest_expect_res_t 526 * 527 * Checks if the numeric range, or string, in @e contains the numeric 528 * value, or string, in @check. 529 * 530 * Returns: true if the range or string contains the expected value 531 */ 532 MUTEST_PUBLIC 533 bool 534 mutest_to_contain (mutest_expect_t *e, 535 mutest_expect_res_t *check); 536 537 /** 538 * mutest_to_contain_string: 539 * @e: a #mutest_expect_t 540 * @check: a #mutest_expect_res_t 541 * 542 * Checks that the value in @e is a string containing the 543 * string inside @check. 544 * 545 * Returns: true if the substring is present 546 */ 547 MUTEST_PUBLIC 548 bool 549 mutest_to_contain_string (mutest_expect_t *e, 550 mutest_expect_res_t *check); 551 552 /** 553 * mutest_to_start_with_string: 554 * @e: a #mutest_expect_t 555 * @check: a #mutest_expect_res_t 556 * 557 * Checks that the value inside @e contains a string that 558 * starts with the value contained inside @check. 559 * 560 * Returns: true if the value ends with the expected string 561 */ 562 MUTEST_PUBLIC 563 bool 564 mutest_to_start_with_string (mutest_expect_t *e, 565 mutest_expect_res_t *check); 566 567 /** 568 * mutest_to_end_with_string: 569 * @e: a #mutest_expect_t 570 * @check: a #mutest_expect_res_t 571 * 572 * Checks that the value inside @e contains a string that 573 * ends with the value contained inside @check. 574 * 575 * Returns: true if the value ends with the expected string 576 */ 577 MUTEST_PUBLIC 578 bool 579 mutest_to_end_with_string (mutest_expect_t *e, 580 mutest_expect_res_t *check); 581 582 /** 583 * mutest_expect_value: 584 * @expect: a #mutest_expect_t 585 * 586 * Retrieves the value associated with the expectation. 587 * 588 * You can use this function to write your custom matchers for 589 * mutest_expect(). For instance: 590 * 591 * ```cpp 592 * static bool 593 * custom_pointer_match (mutest_expect_t *e, 594 * mutest_expect_res_t *check) 595 * { 596 * mutest_expect_res_t *value = mutest_expect_value (e); 597 * 598 * return mutest_get_pointer (value) == mutest_get_pointer (check); 599 * } 600 * ``` 601 * 602 * Returns: the #mutest_expect_res_t used when constructing the 603 * expectation 604 */ 605 MUTEST_PUBLIC 606 mutest_expect_res_t * 607 mutest_expect_value (mutest_expect_t *expect); 608 609 /* }}} */ 610 611 /* {{{ Main API */ 612 613 /** 614 * mutest_suite_skip: 615 * @reason: the reason why the suite was skipped 616 * 617 * Skips the current suite. 618 * 619 * You can call this function from within a #mutest_describe_func_t, 620 * or in a #mutest_hook_func_t set with mutest_before(). 621 */ 622 MUTEST_PUBLIC 623 void 624 mutest_suite_skip (const char *reason); 625 626 /** 627 * mutest_spec_skip: 628 * @reason: the reason why the specification was skipped 629 * 630 * Skips the current specification. 631 * 632 * You can call this function from within a #mutest_spec_func_t, 633 * or in a #mutest_hook_func_t set with mutest_before_each(). 634 */ 635 MUTEST_PUBLIC 636 void 637 mutest_spec_skip (const char *reason); 638 639 MUTEST_PUBLIC 640 void 641 mutest_expect_full (const char *file, 642 int line, 643 const char *func_name, 644 const char *description, 645 mutest_expect_res_t *value, 646 mutest_matcher_func_t first_matcher_func, 647 ...) MUTEST_NULL_TERMINATED; 648 649 /** 650 * mutest_expect: 651 * @description: the description of an expectation 652 * @value: the value of the expectation 653 * @expect_func: a function used to check against the @value 654 * @...: a %NULL-terminated list of functions that will check @value 655 * against expected values 656 * 657 * Defines a new expectation. 658 * 659 * An expectation is satisfied if all the @expect_func validate the 660 * given @value. 661 */ 662 #define mutest_expect(description,value,expect_func,...) \ 663 mutest_expect_full (__FILE__, __LINE__, __func__, description, value, expect_func, __VA_ARGS__) 664 665 MUTEST_PUBLIC 666 void 667 mutest_it_full (const char *file, 668 int line, 669 const char *func_name, 670 const char *description, 671 mutest_spec_func_t func); 672 673 /** 674 * mutest_it: 675 * @description: the description of a test specification 676 * @func: the function to be called to initialize the specification 677 * 678 * Describes a new test specification. 679 * 680 * Specifications group various expectations; typically you will use 681 * mutest_expect() to define the various expectations that need to 682 * be satisfied in order to pass the tests. 683 */ 684 #define mutest_it(description,func) \ 685 mutest_it_full (__FILE__, __LINE__, __func__, description, \ 686 (mutest_spec_func_t)(void (*)(void)) func) 687 688 MUTEST_PUBLIC 689 void 690 mutest_describe_full (const char *file, 691 int line, 692 const char *func_name, 693 const char *description, 694 mutest_describe_func_t func); 695 696 /** 697 * mutest_describe: 698 * @description: the description of a test suite 699 * @func: the function to be called to initialize the suite 700 * 701 * Describes a new test suite. 702 * 703 * Test suites group various specifications; typically you will use 704 * mutest_it() to define the specifications for a suite. 705 * 706 * Each test binary can contain multiple test suites. 707 */ 708 #define mutest_describe(description,func) \ 709 mutest_describe_full (__FILE__, __LINE__, __func__, description, \ 710 (mutest_describe_func_t)(void (*)(void)) func) 711 712 /* }}} */ 713 714 /* {{{ Hooks */ 715 716 /** 717 * mutest_before: 718 * @hook: a #mutest_hook_func_t function 719 * 720 * Sets the function to be called once before a suite 721 * defined by mutest_describe(). 722 * 723 * For instance: 724 * 725 * |[<!-- language="C" --> 726 * static void 727 * before_func (void) 728 * { 729 * } 730 * 731 * static void 732 * hooks_suite (mutest_suite_t *suite) 733 * { 734 * // test cases 735 * } 736 * 737 * MUTEST_MAIN ( 738 * // runs once before all tests cases 739 * mutest_before (before_func); 740 * 741 * mutest_describe ("hooks", hooks_suite); 742 * ) 743 * ]| 744 */ 745 MUTEST_PUBLIC 746 void 747 mutest_before (mutest_hook_func_t hook); 748 749 /** 750 * mutest_after: 751 * @hook: a #mutest_hook_func_t function 752 * 753 * Sets the function to be called once after a suite 754 * defined by mutest_describe(). 755 * 756 * For instance: 757 * 758 * |[<!-- language="C" --> 759 * static void 760 * after_func (void) 761 * { 762 * } 763 * 764 * static void 765 * hooks_suite (mutest_suite_t *suite) 766 * { 767 * // test cases 768 * } 769 * 770 * MUTEST_MAIN ( 771 * // runs once after all tests cases 772 * mutest_after (after_func); 773 * 774 * mutest_describe ("hooks", hooks_suite); 775 * ) 776 * ]| 777 */ 778 MUTEST_PUBLIC 779 void 780 mutest_after (mutest_hook_func_t hook); 781 782 /** 783 * mutest_before_each: 784 * @hook: a #mutest_hook_func_t function 785 * 786 * Sets the function to be called before every specification 787 * defined by mutest_it(). 788 * 789 * For instance: 790 * 791 * |[<!-- language="C" --> 792 * static void 793 * before_each_func (void) 794 * { 795 * } 796 * 797 * static void 798 * hooks_suite (mutest_suite_t *suite) 799 * { 800 * // runs before each tests case 801 * mutest_before_each (before_each_func); 802 * 803 * // test cases 804 * } 805 * 806 * MUTEST_MAIN ( 807 * mutest_describe ("hooks", hooks_suite); 808 * ) 809 * ]| 810 */ 811 MUTEST_PUBLIC 812 void 813 mutest_before_each (mutest_hook_func_t hook); 814 815 /** 816 * mutest_after_each: 817 * @hook: a #mutest_hook_func_t function 818 * 819 * Sets the function to be called after each specification 820 * defined by mutest_it(). 821 * 822 * For instance: 823 * 824 * |[<!-- language="C" --> 825 * static void 826 * after_each_func (void) 827 * { 828 * } 829 * 830 * static void 831 * hooks_suite (mutest_suite_t *suite) 832 * { 833 * // runs after each tests case 834 * mutest_after_each (after_each_func); 835 * 836 * // test cases 837 * } 838 * 839 * MUTEST_MAIN ( 840 * mutest_describe ("hooks", hooks_suite); 841 * ) 842 * ]| 843 */ 844 MUTEST_PUBLIC 845 void 846 mutest_after_each (mutest_hook_func_t hook); 847 848 /* }}} */ 849 850 /* {{{ Entry points */ 851 852 /** 853 * mutest_init: 854 * 855 * Explicitly initializes µTest. 856 * 857 * It is not necessary to call this function: mutest_describe() will 858 * do it for you. 859 */ 860 MUTEST_PUBLIC 861 void 862 mutest_init (void); 863 864 /** 865 * mutest_report: 866 * 867 * Reports the total results of all suites. 868 * 869 * Returns: an exit code that can be used to quit the test binary 870 * using consistent values 871 */ 872 MUTEST_PUBLIC 873 int 874 mutest_report (void); 875 876 /** 877 * MUTEST_MAIN; 878 * @_C_: The body of the function 879 * 880 * A convenience macro that defines the main entry point for a test binary. 881 * 882 * This function initialises µTest and reports the results. 883 */ 884 #define MUTEST_MAIN(_C_) \ 885 int main (int argc MUTEST_UNUSED, \ 886 char *argv[] MUTEST_UNUSED) { \ 887 mutest_init (); \ 888 \ 889 { _C_ } \ 890 \ 891 return mutest_report (); \ 892 } 893 894 /* }}} */ 895 896 MUTEST_END_DECLS 897