| 254 | } |
| 255 | |
| 256 | static void permute(int n, int *indexes, void **objects) { |
| 257 | int j; |
| 258 | if (n == 1) { |
| 259 | test_decref_order(indexes, objects); |
| 260 | } else { |
| 261 | for (int i = 1; i <= n; i++) { |
| 262 | permute(n - 1, indexes, objects); |
| 263 | if ((n % 2) == 1) { |
| 264 | j = 1; |
| 265 | } else { |
| 266 | j = i; |
| 267 | } |
| 268 | swap(indexes, j - 1, n - 1); |
| 269 | } |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | TEST_CASE("test_decref_permutations") { |
| 274 | void *objects[4]; |
no test coverage detected