29#include <gtest/gtest.h>
39using namespace loader;
41TEST(ImageFileDataTest, SimpleImage)
46 char filename[] =
"image-XXXXXX";
47 int fd = mkstemp(filename);
58 EXPECT_EQ(size, idf.
len());
72TEST(ImageFileDataTest, GZipImage)
77 char filename_gz[] =
"image-XXXXXX";
78 int fd_gz = mkstemp(filename_gz);
83 char filename[] =
"image-XXXXXX";
84 int fd = mkstemp(filename);
96 EXPECT_EQ(ifd.
len(), ifd_gz.
len());
97 EXPECT_EQ(size, ifd.
len());
98 EXPECT_NE(size_gz, ifd_gz.
len());
const std::string & filename() const
uint8_t const * data() const
TEST(ImageFileDataTest, SimpleImage)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
const uint8_t image_file[]
This image file contains the text "This is a test image.\n" 31 times.
const uint8_t image_file_gzipped[]
This is "image_file" compressed using GZip.