aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/re2/util
diff options
context:
space:
mode:
authormonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
committermonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
commit06e5c21a835c0e923506c4ff27929f34e00761c2 (patch)
tree75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/libs/re2/util
parent03f024c4412e3aa613bb543cf1660176320ba8f4 (diff)
downloadydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz
fix ya.make
Diffstat (limited to 'contrib/libs/re2/util')
-rw-r--r--contrib/libs/re2/util/test.cc34
-rw-r--r--contrib/libs/re2/util/test.h50
2 files changed, 0 insertions, 84 deletions
diff --git a/contrib/libs/re2/util/test.cc b/contrib/libs/re2/util/test.cc
deleted file mode 100644
index 028616b359..0000000000
--- a/contrib/libs/re2/util/test.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2009 The RE2 Authors. All Rights Reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include <stdio.h>
-#include <string>
-
-#include "util/test.h"
-
-namespace testing {
-std::string TempDir() { return "/tmp/"; }
-} // namespace testing
-
-struct Test {
- void (*fn)(void);
- const char *name;
-};
-
-static Test tests[10000];
-static int ntests;
-
-void RegisterTest(void (*fn)(void), const char *name) {
- tests[ntests].fn = fn;
- tests[ntests++].name = name;
-}
-
-int main(int argc, char** argv) {
- for (int i = 0; i < ntests; i++) {
- printf("%s\n", tests[i].name);
- tests[i].fn();
- }
- printf("PASS\n");
- return 0;
-}
diff --git a/contrib/libs/re2/util/test.h b/contrib/libs/re2/util/test.h
deleted file mode 100644
index 54e6f8fbbb..0000000000
--- a/contrib/libs/re2/util/test.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2009 The RE2 Authors. All Rights Reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#ifndef UTIL_TEST_H_
-#define UTIL_TEST_H_
-
-#include "util/util.h"
-#include "util/logging.h"
-
-namespace testing {
-std::string TempDir();
-} // namespace testing
-
-#define TEST(x, y) \
- void x##y(void); \
- TestRegisterer r##x##y(x##y, # x "." # y); \
- void x##y(void)
-
-void RegisterTest(void (*)(void), const char*);
-
-class TestRegisterer {
- public:
- TestRegisterer(void (*fn)(void), const char *s) {
- RegisterTest(fn, s);
- }
-};
-
-// fatal assertions
-#define ASSERT_TRUE CHECK
-#define ASSERT_FALSE(x) CHECK(!(x))
-#define ASSERT_EQ CHECK_EQ
-#define ASSERT_NE CHECK_NE
-#define ASSERT_LT CHECK_LT
-#define ASSERT_LE CHECK_LE
-#define ASSERT_GT CHECK_GT
-#define ASSERT_GE CHECK_GE
-
-// nonfatal assertions
-// TODO(rsc): Do a better job?
-#define EXPECT_TRUE CHECK
-#define EXPECT_FALSE(x) CHECK(!(x))
-#define EXPECT_EQ CHECK_EQ
-#define EXPECT_NE CHECK_NE
-#define EXPECT_LT CHECK_LT
-#define EXPECT_LE CHECK_LE
-#define EXPECT_GT CHECK_GT
-#define EXPECT_GE CHECK_GE
-
-#endif // UTIL_TEST_H_