![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/share/GNUstep/Makefiles/TestFramework/ |
Upload File : |
#import "Testing.h" #import <Foundation/NSRange.h> /* An eighth test ... complex code fragments * * If you run the test with 'gnustep-tests example8.m' it should * report one test pass. */ int main() { /* Start a set. */ START_SET("example set") /* Here we demonstrate that the 'expression' evaluated by the PASS * macro can actually be an arbitrarily complex piece of code as * long as the last statement returns an integral value which can * be used to represent a pass (non zero) or fail (if zero). * Where such a code fragment contains commas, it must be written * inside brackets to let the macro preprocessor know that the whole * code fragement is the first parameter to the macro. */ PASS(({ NSRange r = NSMakeRange(1, 10); NSEqualRanges(r, NSMakeRange(1, 10)); }), "a long code-fragment/expression works") END_SET("example set") return 0; }