mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
last for today
This commit is contained in:
parent
0f8cbd1bfc
commit
477de3b6b7
|
@ -18,7 +18,7 @@ add_executable(sandboxed
|
|||
)
|
||||
|
||||
target_link_libraries(sandboxed PRIVATE
|
||||
tiff_sapi
|
||||
sapi::sapi
|
||||
sandbox2::temp_file
|
||||
sapi::sapi
|
||||
tiff_sapi
|
||||
)
|
||||
|
|
|
@ -115,7 +115,7 @@ absl::Status LibTIFFMain(const std::string& srcfile) {
|
|||
// sandbox(absolute_path_to_dir, srcfile) or
|
||||
// sandbox(absolute_path_to_dir). file and dir should be exists.
|
||||
// srcfile must also be absolute_path_to_file
|
||||
TiffSapiSandbox sandbox("", srcfile);
|
||||
TiffSapiSandbox sandbox(srcfile);
|
||||
|
||||
// initialize sapi vars after constructing TiffSapiSandbox
|
||||
sapi::v::UShort h, v;
|
||||
|
|
|
@ -18,20 +18,20 @@ add_executable(tests
|
|||
check_tag.h
|
||||
check_tag.cc
|
||||
defer_strile_writing.cc
|
||||
helper.h
|
||||
helper.cc
|
||||
long_tag.cc
|
||||
raw_decode.cc
|
||||
short_tag.cc
|
||||
helper.h
|
||||
helper.cc
|
||||
)
|
||||
|
||||
target_link_libraries(tests PRIVATE
|
||||
tiff_sapi
|
||||
sapi::sapi
|
||||
sandbox2::temp_file
|
||||
gtest
|
||||
gmock
|
||||
gtest
|
||||
gtest_main
|
||||
sandbox2::temp_file
|
||||
sapi::sapi
|
||||
tiff_sapi
|
||||
)
|
||||
|
||||
gtest_discover_tests(tests)
|
||||
|
|
|
@ -215,7 +215,8 @@ void TestWriting(const char* mode, int tiled, int height) {
|
|||
api.TIFFWriteEncodedTile(&tif, i, tilebuffer_.PtrBoth(), TBS);
|
||||
ASSERT_THAT(status_or_int, IsOk()) << "TIFFWriteEncodedTile fatal error";
|
||||
EXPECT_THAT(status_or_int.value(), Eq(TBS))
|
||||
<< "line " << i << ": expected 256, got " << status_or_int.value();
|
||||
<< "line " << i << ": expected " << TBS << ", got "
|
||||
<< status_or_int.value();
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < height; ++i) {
|
||||
|
@ -254,7 +255,8 @@ void TestWriting(const char* mode, int tiled, int height) {
|
|||
ASSERT_THAT(status_or_long, IsOk())
|
||||
<< "TIFFReadEncodedTile fatal error";
|
||||
EXPECT_THAT(status_or_long.value(), Eq(TBS))
|
||||
<< "line " << i << ": expected 256, got " << status_or_long.value();
|
||||
<< "line " << i << ": expected " << TBS << ", got "
|
||||
<< status_or_long.value();
|
||||
|
||||
bool cmp = tilebuffer[0] != expected_c || tilebuffer[255] != expected_c;
|
||||
|
||||
|
|
|
@ -23,10 +23,10 @@ std::string GetImagesDir() {
|
|||
LOG(ERROR) << "Something went wrong: CWD don't contain build dir. "
|
||||
<< "Please run tests from build dir, path might be incorrect\n";
|
||||
|
||||
return cwd + "/test/images";
|
||||
return sandbox2::file::JoinPath(cwd, "test", "images");
|
||||
}
|
||||
|
||||
return cwd.substr(0, find) + "/test/images";
|
||||
return sandbox2::file::JoinPath(cwd.substr(0, find), "test", "images");
|
||||
}
|
||||
|
||||
std::string GetFilePath(const std::string& filename) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user