F_file_type_socket_d,
};
- for (int i = 0; i < 8; ++i) {
+ for (int j = 0; j < 8; ++j) {
struct stat statistics;
memset(&statistics, 0, sizeof(struct stat));
- statistics.st_mode = 1 | types[i];
+ statistics.st_mode = 1 | types[j];
+
+ for (int i = 0; i < 8; ++i) {
+
+ // Skip what would return false.
+ if (j != i) continue;
- will_return(__wrap_lstat, false);
- will_return(__wrap_lstat, &statistics);
- will_return(__wrap_lstat, 0);
+ will_return(__wrap_lstat, false);
+ will_return(__wrap_lstat, &statistics);
+ will_return(__wrap_lstat, 0);
- const f_status_t status = f_file_is(path, types[i], F_false);
+ const f_status_t status = f_file_is(path, types[i], F_false);
- assert_int_equal(status, F_true);
+ assert_int_equal(status, F_true);
+ } // for
} // for
}
F_file_type_socket_d,
};
- for (int i = 0; i < 8; ++i) {
+ for (int j = 0; j < 8; ++j) {
struct stat statistics;
memset(&statistics, 0, sizeof(struct stat));
- statistics.st_mode = 1 | types[i];
+ statistics.st_mode = 1 | types[j];
+
+ for (int i = 0; i < 8; ++i) {
+
+ // Skip what would return false.
+ if (j != i) continue;
- will_return(__wrap_fstatat, false);
- will_return(__wrap_fstatat, &statistics);
- will_return(__wrap_fstatat, 0);
+ will_return(__wrap_fstatat, false);
+ will_return(__wrap_fstatat, &statistics);
+ will_return(__wrap_fstatat, 0);
- const f_status_t status = f_file_is_at(0, path, types[i], 0);
+ const f_status_t status = f_file_is_at(0, path, types[i], 0);
- assert_int_equal(status, F_true);
+ assert_int_equal(status, F_true);
+ } // for
} // for
}