mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
removed CMakeLists.txt from lodepng folder. Now the library is built from the parent folder
This commit is contained in:
parent
3d015be05c
commit
0707d8d9e2
|
@ -19,7 +19,9 @@ project(lodepng_sapi CXX)
|
|||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED 17)
|
||||
|
||||
add_subdirectory(lodepng-master)
|
||||
add_library(lodepng STATIC lodepng-master/lodepng.cpp lodepng-master/lodepng.h)
|
||||
|
||||
# add_subdirectory(lodepng-master)
|
||||
|
||||
|
||||
# unsandboxed main
|
||||
|
|
|
@ -1 +1 @@
|
|||
/usr/local/google/home/amedar/internship/sandboxed-api/build
|
||||
/usr/local/google/home/amedar/internship/sandboxed-api/oss-internship-2020/sapi_lodepng/build/sandboxed-api-build
|
|
@ -1,15 +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.
|
||||
|
||||
add_library(lodepng STATIC lodepng.cpp lodepng.h)
|
|
@ -52,6 +52,8 @@ TEST(generate_image, encode_decode_compare_one_step) {
|
|||
unsigned int width = 512, height = 512;
|
||||
unsigned char *image = (unsigned char *)malloc(width * height * 4);
|
||||
|
||||
ASSERT_TRUE(image);
|
||||
|
||||
for (int y = 0; y < height; ++y) {
|
||||
for (int x = 0; x < width; ++x) {
|
||||
image[4 * width * y + 4 * x + 0] = 255 * !(x & y);
|
||||
|
@ -126,6 +128,8 @@ TEST(generate_image, encode_decode_compare_two_step) {
|
|||
unsigned int width = 512, height = 512;
|
||||
unsigned char *image = (unsigned char *)malloc(width * height * 4);
|
||||
|
||||
ASSERT_TRUE(image);
|
||||
|
||||
for (int y = 0; y < height; ++y) {
|
||||
for (int x = 0; x < width; ++x) {
|
||||
image[4 * width * y + 4 * x + 0] = 255 * !(x & y);
|
||||
|
@ -153,8 +157,6 @@ TEST(generate_image, encode_decode_compare_two_step) {
|
|||
ASSERT_TRUE(result.ok());
|
||||
ASSERT_EQ(result.value(), 0);
|
||||
|
||||
std::cout << "sapi_pngsize = " << sapi_pngsize.GetValue() << std::endl;
|
||||
|
||||
// the new array (pointed to by sapi_png_ptr) is allocated
|
||||
// inside the sandboxed process so we need to transfer it to this
|
||||
// process
|
||||
|
@ -172,6 +174,7 @@ TEST(generate_image, encode_decode_compare_two_step) {
|
|||
api.lodepng_save_file(sapi_png_array.PtrBefore(), sapi_pngsize.GetValue(),
|
||||
sapi_filename.PtrBefore());
|
||||
|
||||
|
||||
ASSERT_TRUE(result.ok());
|
||||
ASSERT_EQ(result.value(), 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user