mirror of
https://github.com/google/leveldb.git
synced 2026-08-18 10:33:27 +08:00
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
This commit is contained in:
committed by
Victor Costan
parent
b2801ee1a0
commit
8f464e7f68
@@ -130,8 +130,3 @@ TEST(WriteBatchTest, ApproximateSize) {
|
||||
}
|
||||
|
||||
} // namespace leveldb
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user