Loading cmds/dumpstate/tests/dumpstate_smoke_test.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -214,8 +214,8 @@ class ZippedBugreportGenerationTest : public Test { duration = std::chrono::duration_cast<std::chrono::milliseconds>(end - start); } static const char* getZipFilePath() { return ds.GetPath(".zip").c_str(); static const std::string getZipFilePath() { return ds.GetPath(".zip"); } }; std::shared_ptr<std::vector<SectionInfo>> ZippedBugreportGenerationTest::sections = Loading @@ -224,12 +224,12 @@ Dumpstate& ZippedBugreportGenerationTest::ds = Dumpstate::GetInstance(); std::chrono::milliseconds ZippedBugreportGenerationTest::duration = 0s; TEST_F(ZippedBugreportGenerationTest, IsGeneratedWithoutErrors) { EXPECT_EQ(access(getZipFilePath(), F_OK), 0); EXPECT_EQ(access(getZipFilePath().c_str(), F_OK), 0); } TEST_F(ZippedBugreportGenerationTest, Is3MBto30MBinSize) { struct stat st; EXPECT_EQ(stat(getZipFilePath(), &st), 0); EXPECT_EQ(stat(getZipFilePath().c_str(), &st), 0); EXPECT_GE(st.st_size, 3000000 /* 3MB */); EXPECT_LE(st.st_size, 30000000 /* 30MB */); } Loading @@ -248,7 +248,7 @@ class ZippedBugReportContentsTest : public Test { public: ZipArchiveHandle handle; void SetUp() { ASSERT_EQ(OpenArchive(ZippedBugreportGenerationTest::getZipFilePath(), &handle), 0); ASSERT_EQ(OpenArchive(ZippedBugreportGenerationTest::getZipFilePath().c_str(), &handle), 0); } void TearDown() { CloseArchive(handle); Loading Loading @@ -312,7 +312,7 @@ TEST_F(ZippedBugReportContentsTest, ContainsSomeFileSystemFiles) { class BugreportSectionTest : public Test { public: static void SetUpTestCase() { ParseSections(ZippedBugreportGenerationTest::getZipFilePath(), ParseSections(ZippedBugreportGenerationTest::getZipFilePath().c_str(), ZippedBugreportGenerationTest::sections.get()); } Loading Loading
cmds/dumpstate/tests/dumpstate_smoke_test.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -214,8 +214,8 @@ class ZippedBugreportGenerationTest : public Test { duration = std::chrono::duration_cast<std::chrono::milliseconds>(end - start); } static const char* getZipFilePath() { return ds.GetPath(".zip").c_str(); static const std::string getZipFilePath() { return ds.GetPath(".zip"); } }; std::shared_ptr<std::vector<SectionInfo>> ZippedBugreportGenerationTest::sections = Loading @@ -224,12 +224,12 @@ Dumpstate& ZippedBugreportGenerationTest::ds = Dumpstate::GetInstance(); std::chrono::milliseconds ZippedBugreportGenerationTest::duration = 0s; TEST_F(ZippedBugreportGenerationTest, IsGeneratedWithoutErrors) { EXPECT_EQ(access(getZipFilePath(), F_OK), 0); EXPECT_EQ(access(getZipFilePath().c_str(), F_OK), 0); } TEST_F(ZippedBugreportGenerationTest, Is3MBto30MBinSize) { struct stat st; EXPECT_EQ(stat(getZipFilePath(), &st), 0); EXPECT_EQ(stat(getZipFilePath().c_str(), &st), 0); EXPECT_GE(st.st_size, 3000000 /* 3MB */); EXPECT_LE(st.st_size, 30000000 /* 30MB */); } Loading @@ -248,7 +248,7 @@ class ZippedBugReportContentsTest : public Test { public: ZipArchiveHandle handle; void SetUp() { ASSERT_EQ(OpenArchive(ZippedBugreportGenerationTest::getZipFilePath(), &handle), 0); ASSERT_EQ(OpenArchive(ZippedBugreportGenerationTest::getZipFilePath().c_str(), &handle), 0); } void TearDown() { CloseArchive(handle); Loading Loading @@ -312,7 +312,7 @@ TEST_F(ZippedBugReportContentsTest, ContainsSomeFileSystemFiles) { class BugreportSectionTest : public Test { public: static void SetUpTestCase() { ParseSections(ZippedBugreportGenerationTest::getZipFilePath(), ParseSections(ZippedBugreportGenerationTest::getZipFilePath().c_str(), ZippedBugreportGenerationTest::sections.get()); } Loading