@@ -2225,71 +2225,6 @@ extern "C" {
22252225#define ASSUME_ITS_LENGTH_EQUAL_CSTR (actual , expected_len ) \
22262226 FOSSIL_TEST_ASSUME(strlen((actual)) == (expected_len), "Expected length of C string " #actual " to be equal to " #expected_len)
22272227
2228- // **************************************************
2229- //
2230- // Array ASSUMEions
2231- //
2232- // **************************************************
2233-
2234- /**
2235- * @brief Assumes that the given arrays are equal.
2236- *
2237- * @param actual The actual array.
2238- * @param expected The expected array.
2239- * @param length The length of the arrays.
2240- */
2241- #define ASSUME_ITS_EQUAL_ARRAY (actual , expected , length ) \
2242- for (size_t i = 0; i < (length); i++) { \
2243- FOSSIL_TEST_ASSUME((actual)[i] == (expected)[i], "Expected array element " #actual " to be equal to " #expected); \
2244- }
2245-
2246- /**
2247- * @brief Assumes that the given arrays are not equal.
2248- *
2249- * @param actual The actual array.
2250- * @param expected The expected array.
2251- * @param length The length of the arrays.
2252- */
2253- #define ASSUME_NOT_EQUAL_ARRAY (actual , expected , length ) \
2254- for (size_t i = 0; i < (length); i++) { \
2255- FOSSIL_TEST_ASSUME((actual)[i] != (expected)[i], "Expected array element " #actual " to not be equal to " #expected); \
2256- }
2257-
2258- /**
2259- * @brief Assumes that the length of the given arrays are equal.
2260- *
2261- * @param actual_length The actual length of the array.
2262- * @param expected_length The expected length of the array.
2263- */
2264- #define ASSUME_ITS_LENGTH_EQUAL_ARRAY (actual_length , expected_length ) \
2265- FOSSIL_TEST_ASSUME((actual_length) == (expected_length), "Expected array length " #actual_length " to be equal to " #expected_length)
2266-
2267- /**
2268- * @brief Assumes that the elements of the given array are within the specified range.
2269- *
2270- * @param array The array to be evaluated.
2271- * @param min The minimum value of the range.
2272- * @param max The maximum value of the range.
2273- * @param length The length of the array.
2274- */
2275- #define ASSUME_ITS_WITHIN_RANGE_ARRAY (array , min , max , length ) \
2276- for (size_t i = 0; i < (length); i++) { \
2277- FOSSIL_TEST_ASSUME((array)[i] >= (min) && (array)[i] <= (max), "Expected array element " #array " to be within range [" #min ", " #max "]"); \
2278- }
2279-
2280- /**
2281- * @brief Assumes that the elements of the given array are not within the specified range.
2282- *
2283- * @param array The array to be evaluated.
2284- * @param min The minimum value of the range.
2285- * @param max The maximum value of the range.
2286- * @param length The length of the array.
2287- */
2288- #define ASSUME_NOT_WITHIN_RANGE_ARRAY (array , min , max , length ) \
2289- for (size_t i = 0; i < (length); i++) { \
2290- FOSSIL_TEST_ASSUME((array)[i] < (min) || (array)[i] > (max), "Expected array element " #array " to not be within range [" #min ", " #max "]"); \
2291- }
2292-
22932228#ifdef __cplusplus
22942229}
22952230#endif
0 commit comments