summaryrefslogtreecommitdiff
path: root/table
diff options
context:
space:
mode:
authorVictor Costan <costan@google.com>2022-01-03 20:57:56 +0000
committerVictor Costan <pwnall@chromium.org>2022-01-03 21:05:04 +0000
commit8f464e7f68fd9d50ed39b2866ef8dac9c837439d (patch)
treeb6014b27534d4677bf761b4c84746a75aaa08c7d /table
parentb2801ee1a0e3a5c0c393dc04eef63691f79ed694 (diff)
downloadleveldb-8f464e7f68fd9d50ed39b2866ef8dac9c837439d.tar.gz
Remove main() from most tests.
This gives some flexibility to embedders. Currently, embedders have to build a binary for each test file. After this CL, embedders can still choose to have a binary for each test file, by linking each test file with a googletest target that includes main() (usually "gtest_main"). Embedders can also choose to build a single binary for almost all test files, and link with a googletest target that includes main(). The latter is more convenient for projects that have very few test binaries, like Chromium. PiperOrigin-RevId: 419470798
Diffstat (limited to 'table')
-rw-r--r--table/filter_block_test.cc5
-rw-r--r--table/table_test.cc5
2 files changed, 0 insertions, 10 deletions
diff --git a/table/filter_block_test.cc b/table/filter_block_test.cc
index 91a6be2..3ee41cf 100644
--- a/table/filter_block_test.cc
+++ b/table/filter_block_test.cc
@@ -120,8 +120,3 @@ TEST_F(FilterBlockTest, MultiChunk) {
}
} // namespace leveldb
-
-int main(int argc, char** argv) {
- testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}
diff --git a/table/table_test.cc b/table/table_test.cc
index 190dd0f..7f0f998 100644
--- a/table/table_test.cc
+++ b/table/table_test.cc
@@ -827,8 +827,3 @@ TEST(TableTest, ApproximateOffsetOfCompressed) {
}
} // namespace leveldb
-
-int main(int argc, char** argv) {
- testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}