third_party/bloaty/third_party/re2/util/test.cc
Go to the documentation of this file.
1 // Copyright 2009 The RE2 Authors. All Rights Reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4 
5 #include <stdio.h>
6 
7 #include "util/test.h"
8 
9 DEFINE_string(test_tmpdir, "/var/tmp", "temp directory");
10 
11 struct Test {
12  void (*fn)(void);
13  const char *name;
14 };
15 
16 static Test tests[10000];
17 static int ntests;
18 
19 void RegisterTest(void (*fn)(void), const char *name) {
20  tests[ntests].fn = fn;
21  tests[ntests++].name = name;
22 }
23 
24 int main(int argc, char** argv) {
25  for (int i = 0; i < ntests; i++) {
26  printf("%s\n", tests[i].name);
27  tests[i].fn();
28  }
29  printf("PASS\n");
30  return 0;
31 }
printf
_Use_decl_annotations_ int __cdecl printf(const char *_Format,...)
Definition: cs_driver.c:91
RegisterTest
void RegisterTest(void(*fn)(void), const char *name)
Definition: third_party/bloaty/third_party/re2/util/test.cc:19
setup.name
name
Definition: setup.py:542
generate-asm-lcov.fn
fn
Definition: generate-asm-lcov.py:146
Test::fn
void(* fn)(void)
Definition: third_party/bloaty/third_party/re2/util/test.cc:12
ntests
static int ntests
Definition: third_party/bloaty/third_party/re2/util/test.cc:17
Test::name
const char * name
Definition: third_party/bloaty/third_party/re2/util/test.cc:13
tests
Definition: src/python/grpcio_tests/tests/__init__.py:1
main
int main(int argc, char **argv)
Definition: third_party/bloaty/third_party/re2/util/test.cc:24
Test
Definition: hpack_parser_test.cc:43
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
DEFINE_string
DEFINE_string(test_tmpdir, "/var/tmp", "temp directory")


grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:27