| OLD | NEW |
| 1 /* Copyright (c) 2011 Xiph.Org Foundation | 1 /* Copyright (c) 2011 Xiph.Org Foundation |
| 2 Written by Gregory Maxwell */ | 2 Written by Gregory Maxwell */ |
| 3 /* | 3 /* |
| 4 Redistribution and use in source and binary forms, with or without | 4 Redistribution and use in source and binary forms, with or without |
| 5 modification, are permitted provided that the following conditions | 5 modification, are permitted provided that the following conditions |
| 6 are met: | 6 are met: |
| 7 | 7 |
| 8 - Redistributions of source code must retain the above copyright | 8 - Redistributions of source code must retain the above copyright |
| 9 notice, this list of conditions and the following disclaimer. | 9 notice, this list of conditions and the following disclaimer. |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 static OPUS_INLINE opus_uint32 fast_rand(void) | 57 static OPUS_INLINE opus_uint32 fast_rand(void) |
| 58 { | 58 { |
| 59 Rz=36969*(Rz&65535)+(Rz>>16); | 59 Rz=36969*(Rz&65535)+(Rz>>16); |
| 60 Rw=18000*(Rw&65535)+(Rw>>16); | 60 Rw=18000*(Rw&65535)+(Rw>>16); |
| 61 return (Rz<<16)+Rw; | 61 return (Rz<<16)+Rw; |
| 62 } | 62 } |
| 63 static opus_uint32 iseed; | 63 static opus_uint32 iseed; |
| 64 | 64 |
| 65 #ifdef __GNUC__ | 65 #ifdef __GNUC__ |
| 66 __attribute__((noreturn)) | 66 __attribute__((noreturn)) |
| 67 #elif defined(_MSC_VER) |
| 68 __declspec(noreturn) |
| 67 #endif | 69 #endif |
| 68 static OPUS_INLINE void _test_failed(const char *file, int line) | 70 static OPUS_INLINE void _test_failed(const char *file, int line) |
| 69 { | 71 { |
| 70 fprintf(stderr,"\n ***************************************************\n"); | 72 fprintf(stderr,"\n ***************************************************\n"); |
| 71 fprintf(stderr," *** A fatal error was detected. ***\n"); | 73 fprintf(stderr," *** A fatal error was detected. ***\n"); |
| 72 fprintf(stderr," ***************************************************\n"); | 74 fprintf(stderr," ***************************************************\n"); |
| 73 fprintf(stderr,"Please report this failure and include\n"); | 75 fprintf(stderr,"Please report this failure and include\n"); |
| 74 fprintf(stderr,"'make check SEED=%u fails %s at line %d for %s'\n",iseed,file,
line,opus_get_version_string()); | 76 fprintf(stderr,"'make check SEED=%u fails %s at line %d for %s'\n",iseed,file,
line,opus_get_version_string()); |
| 75 fprintf(stderr,"and any relevant details about your system.\n\n"); | 77 fprintf(stderr,"and any relevant details about your system.\n\n"); |
| 76 abort(); | 78 abort(); |
| 77 } | 79 } |
| 78 #define test_failed() _test_failed(__FILE__, __LINE__); | 80 #define test_failed() _test_failed(__FILE__, __LINE__); |
| 81 |
| 82 void regression_test(void); |
| OLD | NEW |