-
Notifications
You must be signed in to change notification settings - Fork 27.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
147e64f
commit 8d7d8e6
Showing
11 changed files
with
170 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright 2013 The Flutter 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 "impeller/archivist/archivist_fixture.h" | ||
|
||
#include "flutter/fml/paths.h" | ||
|
||
namespace impeller { | ||
namespace testing { | ||
|
||
ArchivistFixture::ArchivistFixture() { | ||
std::stringstream stream; | ||
stream << flutter::testing::GetCurrentTestName() << ".db"; | ||
archive_file_name_ = fml::paths::JoinPaths( | ||
{flutter::testing::GetFixturesPath(), stream.str()}); | ||
} | ||
|
||
ArchivistFixture::~ArchivistFixture() = default; | ||
|
||
const std::string ArchivistFixture::GetArchiveFileName() const { | ||
return archive_file_name_; | ||
} | ||
|
||
void ArchivistFixture::SetUp() { | ||
DeleteArchiveFile(); | ||
} | ||
|
||
void ArchivistFixture::TearDown() { | ||
// DeleteArchiveFile(); | ||
} | ||
|
||
void ArchivistFixture::DeleteArchiveFile() const { | ||
fml::UnlinkFile(archive_file_name_.c_str()); | ||
} | ||
|
||
} // namespace testing | ||
} // namespace impeller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#pragma once | ||
|
||
#include "flutter/fml/macros.h" | ||
#include "flutter/testing/testing.h" | ||
|
||
namespace impeller { | ||
namespace testing { | ||
|
||
class ArchivistFixture : public ::testing::Test { | ||
public: | ||
ArchivistFixture(); | ||
|
||
~ArchivistFixture(); | ||
|
||
// |::testing::Test| | ||
void SetUp() override; | ||
|
||
// |::testing::Test| | ||
void TearDown() override; | ||
|
||
const std::string GetArchiveFileName() const; | ||
|
||
private: | ||
std::string archive_file_name_; | ||
|
||
void DeleteArchiveFile() const; | ||
|
||
FML_DISALLOW_COPY_AND_ASSIGN(ArchivistFixture); | ||
}; | ||
|
||
} // namespace testing | ||
} // namespace impeller |
Oops, something went wrong.