Moved tests to root folder, removed unused headers
|
@ -54,3 +54,27 @@ cc_binary(
|
|||
":guetzli_sapi",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "transaction_tests",
|
||||
srcs = ["guetzli_transaction_test.cc"],
|
||||
visibility=["//visibility:public"],
|
||||
deps = [
|
||||
"//:guetzli_sapi",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
size = "large",
|
||||
data = glob(["testdata/*"]),
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "sapi_lib_tests",
|
||||
srcs = ["guetzli_sapi_test.cc"],
|
||||
visibility=["//visibility:public"],
|
||||
deps = [
|
||||
"//:guetzli_sapi",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
size = "large",
|
||||
data = glob(["testdata/*"]),
|
||||
)
|
||||
|
|
|
@ -12,12 +12,6 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ constexpr int kDefaultQualityTarget = 95;
|
|||
constexpr int kDefaultMemlimitMb = 6000;
|
||||
|
||||
constexpr absl::string_view kRelativePathToTestdata =
|
||||
"/guetzli_sandboxed/tests/testdata/";
|
||||
"/guetzli_sandboxed/testdata/";
|
||||
|
||||
std::string GetPathToInputFile(absl::string_view filename) {
|
||||
return absl::StrCat(getenv("TEST_SRCDIR"), kRelativePathToTestdata, filename);
|
||||
|
@ -88,7 +88,7 @@ TEST_F(GuetzliSapiTest, ProcessRGB) {
|
|||
kDefaultMemlimitMb
|
||||
};
|
||||
sapi::v::LenVal output(0);
|
||||
auto processing_result = api_->ProcessRgb(processing_params.PtrBefore(),
|
||||
sapi::StatusOr<bool> processing_result = api_->ProcessRgb(processing_params.PtrBefore(),
|
||||
output.PtrBoth());
|
||||
ASSERT_TRUE(processing_result.value_or(false)) << "Error processing rgb data";
|
||||
std::string reference_data =
|
||||
|
@ -115,7 +115,7 @@ TEST_F(GuetzliSapiTest, ProcessJpeg) {
|
|||
kDefaultMemlimitMb
|
||||
};
|
||||
sapi::v::LenVal output(0);
|
||||
auto processing_result = api_->ProcessJpeg(processing_params.PtrBefore(),
|
||||
sapi::StatusOr<bool> processing_result = api_->ProcessJpeg(processing_params.PtrBefore(),
|
||||
output.PtrBoth());
|
||||
ASSERT_TRUE(processing_result.value_or(false)) << "Error processing jpg data";
|
||||
std::string reference_data =
|
|
@ -44,7 +44,7 @@ constexpr int kDefaultQualityTarget = 95;
|
|||
constexpr int kDefaultMemlimitMb = 6000;
|
||||
|
||||
constexpr absl::string_view kRelativePathToTestdata =
|
||||
"/guetzli_sandboxed/tests/testdata/";
|
||||
"/guetzli_sandboxed/testdata/";
|
||||
|
||||
std::string GetPathToFile(absl::string_view filename) {
|
||||
return absl::StrCat(getenv("TEST_SRCDIR"), kRelativePathToTestdata, filename);
|
Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 173 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
@ -1,39 +0,0 @@
|
|||
# Copyright 2020 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
cc_test(
|
||||
name = "transaction_tests",
|
||||
srcs = ["guetzli_transaction_test.cc"],
|
||||
visibility=["//visibility:public"],
|
||||
deps = [
|
||||
"//:guetzli_sapi",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
size = "large",
|
||||
data = glob(["testdata/*"]),
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "sapi_lib_tests",
|
||||
srcs = ["guetzli_sapi_test.cc"],
|
||||
visibility=["//visibility:public"],
|
||||
deps = [
|
||||
"//:guetzli_sapi",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
size = "large",
|
||||
data = glob(["testdata/*"]),
|
||||
)
|