open_file* test_freopen(const tchar* filename, const tchar* mode, open_file* current) { TM_ASSERT(filename); TM_ASSERT(mode); TM_ASSERT(current); internal_errno = 0; if (mock.freopen_should_fail_with) { internal_errno = mock.freopen_should_fail_with; mock.freopen_should_fail_with = 0; current->has_error = true; return nullptr; } test_fclose(current); return test_fopen(filename, mode); }
int main (void) { return test_fopen (); }
int main () { return test_fopen (); }