remove unused includes

This commit is contained in:
Alexandra Latysheva 2020-10-28 10:32:55 +00:00
parent 225b57aed3
commit 124680eb89
8 changed files with 41 additions and 30 deletions

View File

@ -14,9 +14,9 @@
#include "check_tag.h" // NOLINT(build/include)
using ::sapi::IsOk;
using ::testing::Eq;
using ::testing::IsTrue;
#include "gtest/gtest.h"
#include "sandboxed_api/util/status_matchers.h"
#include "tiffio.h" // NOLINT(build/include)
void CheckShortField(TiffApi& api, sapi::v::RemotePtr& tif, const ttag_t field,
const uint16_t value) {
@ -24,10 +24,10 @@ void CheckShortField(TiffApi& api, sapi::v::RemotePtr& tif, const ttag_t field,
absl::StatusOr<int> status_or_int;
status_or_int = api.TIFFGetField1(&tif, field, tmp.PtrBoth());
ASSERT_THAT(status_or_int, IsOk()) << "TIFFGetField1 fatal error";
EXPECT_THAT(status_or_int.value(), IsTrue())
ASSERT_THAT(status_or_int, ::sapi::IsOk()) << "TIFFGetField1 fatal error";
EXPECT_THAT(status_or_int.value(), ::testing::IsTrue())
<< "Problem fetching tag " << field;
EXPECT_THAT(tmp.GetValue(), Eq(value))
EXPECT_THAT(tmp.GetValue(), ::testing::Eq(value))
<< "Wrong SHORT value fetched for tag " << field;
}
@ -40,12 +40,12 @@ void CheckShortPairedField(TiffApi& api, sapi::v::RemotePtr& tif,
status_or_int =
api.TIFFGetField2(&tif, field, tmp0.PtrBoth(), tmp1.PtrBoth());
ASSERT_THAT(status_or_int, IsOk()) << "TIFFGetField2 fatal error";
EXPECT_THAT(status_or_int.value(), IsTrue())
ASSERT_THAT(status_or_int, ::sapi::IsOk()) << "TIFFGetField2 fatal error";
EXPECT_THAT(status_or_int.value(), ::testing::IsTrue())
<< "Problem fetching tag " << field;
EXPECT_THAT(tmp0.GetValue(), Eq(values[0]))
EXPECT_THAT(tmp0.GetValue(), ::testing::Eq(values[0]))
<< "Wrong SHORT PAIR[0] fetched for tag " << field;
EXPECT_THAT(tmp1.GetValue(), Eq(values[1]))
EXPECT_THAT(tmp1.GetValue(), ::testing::Eq(values[1]))
<< "Wrong SHORT PAIR[1] fetched for tag " << field;
}
@ -55,9 +55,9 @@ void CheckLongField(TiffApi& api, sapi::v::RemotePtr& tif, const ttag_t field,
absl::StatusOr<int> status_or_int;
status_or_int = api.TIFFGetField1(&tif, field, tmp.PtrBoth());
ASSERT_THAT(status_or_int, IsOk()) << "TIFFGetField1 fatal error";
EXPECT_THAT(status_or_int.value(), IsTrue())
ASSERT_THAT(status_or_int, ::sapi::IsOk()) << "TIFFGetField1 fatal error";
EXPECT_THAT(status_or_int.value(), ::testing::IsTrue())
<< "Problem fetching tag " << field;
EXPECT_THAT(tmp.GetValue(), Eq(value))
EXPECT_THAT(tmp.GetValue(), ::testing::Eq(value))
<< "Wrong LONG value fetched for tag " << field;
}

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <cstring>
#include "../sandboxed.h" // NOLINT(build/include)
#include "helper.h" // NOLINT(build/include)
#include "tiffio.h" // NOLINT(build/include)

View File

@ -12,9 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <cstdint>
#include "../sandboxed.h" // NOLINT(build/include)
#include "gtest/gtest.h"
#include "helper.h" // NOLINT(build/include)
#include "sandboxed_api/sandbox2/util/fileops.h"
#include "sandboxed_api/sandbox2/util/path.h"
#include "sandboxed_api/sandbox2/util/temp_file.h"
#include "sandboxed_api/util/status_matchers.h"
#include "tiffio.h" // NOLINT(build/include)
namespace {

View File

@ -14,6 +14,10 @@
#include "helper.h" // NOLINT(build/include)
#include "../sandboxed.h" // NOLINT(build/include)
#include "sandboxed_api/sandbox2/util/fileops.h"
#include "sandboxed_api/sandbox2/util/path.h"
std::string GetImagesFolder() {
std::string cwd = sandbox2::file_util::fileops::GetCWD();
auto find = cwd.rfind("/build");

View File

@ -12,14 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <optional>
#include <string>
#include "../sandboxed.h" // NOLINT(build/include)
#include "gtest/gtest.h"
#include "sandboxed_api/sandbox2/util/fileops.h"
#include "sandboxed_api/sandbox2/util/path.h"
#include "sandboxed_api/sandbox2/util/temp_file.h"
#include "sandboxed_api/util/status_matchers.h"
std::string GetFilePath(const std::string& filename);

View File

@ -15,6 +15,11 @@
#include <array>
#include "check_tag.h" // NOLINT(build/include)
#include "gtest/gtest.h"
#include "sandboxed_api/sandbox2/util/fileops.h"
#include "sandboxed_api/sandbox2/util/path.h"
#include "sandboxed_api/sandbox2/util/temp_file.h"
#include "sandboxed_api/util/status_matchers.h"
#include "tiffio.h" // NOLINT(build/include)
namespace {

View File

@ -15,9 +15,12 @@
#include <array>
#include <cstring>
#include "../sandboxed.h" // NOLINT(build/include)
#include "absl/algorithm/container.h"
#include "absl/strings/str_join.h"
#include "gtest/gtest.h"
#include "helper.h" // NOLINT(build/include)
#include "sandboxed_api/util/status_matchers.h"
#include "tiffio.h" // NOLINT(build/include)
namespace {

View File

@ -13,9 +13,13 @@
// limitations under the License.
#include <array>
#include <cstdint>
#include "check_tag.h" // NOLINT(build/include)
#include "gtest/gtest.h"
#include "sandboxed_api/sandbox2/util/fileops.h"
#include "sandboxed_api/sandbox2/util/path.h"
#include "sandboxed_api/sandbox2/util/temp_file.h"
#include "sandboxed_api/util/status_matchers.h"
#include "tiffio.h" // NOLINT(build/include)
namespace {