Lines Matching defs:test
48 /* will be used to test initialization of environ */
51 /* will be used to test initialization of argv */
54 /* will be used to test initialization of argc */
57 /* will be used by some test cases as readable file, please don't write it */
61 struct test {
62 const char *name; /* test name */
593 /* declare tests based on line numbers. There must be exactly one test per line. */
595 case __LINE__: llen += printf("%d %s", test, #name);
599 int test;
612 for (test = min; test >= 0 && test <= max; test++) {
616 * test numbers.
618 switch (test + __LINE__ + 1) {
828 int test;
845 for (test = min; test >= 0 && test <= max; test++) {
849 * test numbers.
851 switch (test + __LINE__ + 1) {
935 int test;
938 for (test = min; test >= 0 && test <= max; test++) {
942 * test numbers.
944 switch (test + __LINE__ + 1) {
1072 int test;
1075 for (test = min; test >= 0 && test <= max; test++) {
1079 * test numbers.
1081 switch (test + __LINE__ + 1) {
1220 /* This is the definition of known test names, with their functions */
1221 static const struct test test_names[] = {
1231 static int is_setting_valid(char *test)
1236 if (!test)
1239 test_len = strlen(test);
1246 if (strncmp(test, test_names[idx].name, len) != 0)
1249 delimiter = test[len];
1267 char *test;
1284 * series of test names and optional ranges:
1287 test = argv[1];
1288 if (!is_setting_valid(test))
1289 test = getenv("NOLIBC_TEST");
1291 if (is_setting_valid(test)) {
1295 comma = strchr(test, ',');
1299 colon = strchr(test, ':');
1304 if (strcmp(test, test_names[idx].name) == 0)
1309 /* The test was named, it will be called at least
1336 /* now's time to call the test */
1337 printf("Running test '%s'\n", test_names[idx].name);
1340 printf("Errors during this test: %d\n\n", err);
1343 printf("Ignoring unknown test name '%s'\n", test);
1345 test = comma;
1346 } while (test && *test);
1348 /* no test mentioned, run everything */
1350 printf("Running test '%s'\n", test_names[idx].name);
1353 printf("Errors during this test: %d\n\n", err);