MCPcopy Index your code
hub / github.com/GJDuck/e9patch / isTest

Function isTest

test/regtest/regtest.cpp:188–197  ·  view source on GitHub ↗

* Test if directory entry is a test case (i.e., ends with ".in"). */

Source from the content-addressed store, hash-verified

186 * Test if directory entry is a test case (i.e., ends with ".in").
187 */
188static int isTest(const struct dirent *entry)
189{
190 size_t len = strlen(entry->d_name);
191 if (len <= 3)
192 return false;
193 if (entry->d_name[len-1] != 'n' || entry->d_name[len-2] != 'i' ||
194 entry->d_name[len-3] != '.')
195 return false;
196 return true;
197}
198
199/*
200 * Entry.

Callers

nothing calls this directly

Calls 1

strlenFunction · 0.50

Tested by

no test coverage detected