Browse Source
My commit 45df0ad2
from 26. Nov 2009 had a little remark:
"The commit also includes a very very simple testapp."
This was never intended to be permanent, but as usually…
The commit adds the needed make magic to compile gtest statically
as it is required and links it against a small runner. All previous
testcase binaries are reimplemented in gtest and combined in this
runner. While most code is a 1:1 translation some had to be rewritten
like compareversion_test.cc, but the coverage remains the same.
debian/1.8.y

29 changed files with 1918 additions and 2086 deletions
@ -1,126 +0,0 @@ |
|||
#include <iostream> |
|||
#include <cstdlib> |
|||
|
|||
#include <apt-pkg/macros.h> |
|||
#include <apt-pkg/error.h> |
|||
|
|||
#if __GNUC__ >= 4 |
|||
#pragma GCC diagnostic push |
|||
#pragma GCC diagnostic ignored "-Wmissing-declarations" |
|||
#endif |
|||
|
|||
#define equals(x,y) assertEquals(y, x, __LINE__) |
|||
#define equalsNot(x,y) assertEqualsNot(y, x, __LINE__) |
|||
|
|||
template < typename X, typename Y > |
|||
APT_NORETURN void OutputAssertEqual(X expect, char const* compare, Y get, unsigned long const &line) { |
|||
std::cerr << "Test FAILED: »" << expect << "« " << compare << " »" << get << "« at line " << line << std::endl; |
|||
_error->DumpErrors(std::cerr); |
|||
std::exit(EXIT_FAILURE); |
|||
} |
|||
|
|||
template < typename X, typename Y > |
|||
void assertEquals(X expect, Y get, unsigned long const &line) { |
|||
if (expect == get) |
|||
return; |
|||
OutputAssertEqual(expect, "==", get, line); |
|||
} |
|||
|
|||
template < typename X, typename Y > |
|||
void assertEqualsNot(X expect, Y get, unsigned long const &line) { |
|||
if (expect != get) |
|||
return; |
|||
OutputAssertEqual(expect, "!=", get, line); |
|||
} |
|||
|
|||
void assertEquals(unsigned int const &expect, int const &get, unsigned long const &line) { |
|||
if (get < 0) |
|||
OutputAssertEqual(expect, "==", get, line); |
|||
assertEquals<unsigned int const&, unsigned int const&>(expect, get, line); |
|||
} |
|||
|
|||
void assertEquals(int const &expect, unsigned int const &get, unsigned long const &line) { |
|||
if (expect < 0) |
|||
OutputAssertEqual(expect, "==", get, line); |
|||
assertEquals<unsigned int const&, unsigned int const&>(expect, get, line); |
|||
} |
|||
|
|||
void assertEquals(unsigned long const &expect, int const &get, unsigned long const &line) { |
|||
if (get < 0) |
|||
OutputAssertEqual(expect, "==", get, line); |
|||
assertEquals<unsigned long const&, unsigned long const&>(expect, get, line); |
|||
} |
|||
|
|||
void assertEquals(int const &expect, unsigned long const &get, unsigned long const &line) { |
|||
if (expect < 0) |
|||
OutputAssertEqual(expect, "==", get, line); |
|||
assertEquals<unsigned long const&, unsigned long const&>(expect, get, line); |
|||
} |
|||
|
|||
|
|||
#define equalsOr2(x,y,z) assertEqualsOr2(y, z, x, __LINE__) |
|||
|
|||
template < typename X, typename Y > |
|||
void OutputAssertEqualOr2(X expect1, X expect2, char const* compare, Y get, unsigned long const &line) { |
|||
std::cerr << "Test FAILED: »" << expect1 << "« or »" << expect2 << "« " << compare << " »" << get << "« at line " << line << std::endl; |
|||
} |
|||
|
|||
template < typename X, typename Y > |
|||
void assertEqualsOr2(X expect1, X expect2, Y get, unsigned long const &line) { |
|||
if (expect1 == get || expect2 == get) |
|||
return; |
|||
OutputAssertEqualOr2(expect1, expect2, "==", get, line); |
|||
} |
|||
|
|||
void assertEqualsOr2(unsigned int const &expect1, unsigned int const &expect2, int const &get, unsigned long const &line) { |
|||
if (get < 0) |
|||
OutputAssertEqualOr2(expect1, expect2, "==", get, line); |
|||
assertEqualsOr2<unsigned int const&, unsigned int const&>(expect1, expect2, get, line); |
|||
} |
|||
|
|||
void assertEqualsOr2(int const &expect1, int const &expect2, unsigned int const &get, unsigned long const &line) { |
|||
if (expect1 < 0 && expect2 < 0) |
|||
OutputAssertEqualOr2(expect1, expect2, "==", get, line); |
|||
assertEqualsOr2<unsigned int const&, unsigned int const&>(expect1, expect2, get, line); |
|||
} |
|||
|
|||
|
|||
#define equalsOr3(w,x,y,z) assertEqualsOr3(x, y, z, w, __LINE__) |
|||
|
|||
template < typename X, typename Y > |
|||
void OutputAssertEqualOr3(X expect1, X expect2, X expect3, char const* compare, Y get, unsigned long const &line) { |
|||
std::cerr << "Test FAILED: »" << expect1 << "« or »" << expect2 << "« or »" << expect3 << "« " << compare << " »" << get << "« at line " << line << std::endl; |
|||
} |
|||
|
|||
template < typename X, typename Y > |
|||
void assertEqualsOr3(X expect1, X expect2, X expect3, Y get, unsigned long const &line) { |
|||
if (expect1 == get || expect2 == get || expect3 == get) |
|||
return; |
|||
OutputAssertEqualOr3(expect1, expect2, expect3, "==", get, line); |
|||
} |
|||
|
|||
#define equalsOr4(v,w,x,y,z) assertEqualsOr4(w, x, y, z, v, __LINE__) |
|||
|
|||
template < typename X, typename Y > |
|||
void OutputAssertEqualOr4(X expect1, X expect2, X expect3, X expect4, char const* compare, Y get, unsigned long const &line) { |
|||
std::cerr << "Test FAILED: »" << expect1 << "« or »" << expect2 << "« or »" << expect3 << "« or »" << expect4 << "« " << compare << " »" << get << "« at line " << line << std::endl; |
|||
} |
|||
|
|||
template < typename X, typename Y > |
|||
void assertEqualsOr4(X expect1, X expect2, X expect3, X expect4, Y get, unsigned long const &line) { |
|||
if (expect1 == get || expect2 == get || expect3 == get || expect4 == get) |
|||
return; |
|||
OutputAssertEqualOr4(expect1, expect2, expect3, expect4, "==", get, line); |
|||
} |
|||
|
|||
// simple helper to quickly output a vectors
|
|||
template < typename X > |
|||
void dumpVector(X vec) { |
|||
for (typename X::const_iterator v = vec.begin(); |
|||
v != vec.end(); ++v) |
|||
std::cout << *v << std::endl; |
|||
} |
|||
|
|||
#if __GNUC__ >= 4 |
|||
#pragma GCC diagnostic pop |
|||
#endif |
@ -0,0 +1,114 @@ |
|||
#include <config.h> |
|||
|
|||
#include <apt-pkg/configuration.h> |
|||
#include <apt-pkg/cdrom.h> |
|||
#include <apt-pkg/cdromutl.h> |
|||
#include <apt-pkg/fileutl.h> |
|||
|
|||
#include <string> |
|||
#include <string.h> |
|||
#include <vector> |
|||
|
|||
#include <gtest/gtest.h> |
|||
|
|||
#include "file-helpers.h" |
|||
|
|||
class Cdrom : public pkgCdrom { |
|||
public: |
|||
std::vector<std::string> ReduceSourcelist(std::string CD,std::vector<std::string> List) { |
|||
pkgCdrom::ReduceSourcelist(CD, List); |
|||
return List; |
|||
} |
|||
}; |
|||
|
|||
TEST(CDROMTest,ReduceSourcelist) |
|||
{ |
|||
Cdrom cd; |
|||
std::vector<std::string> List; |
|||
std::string CD("/media/cdrom/"); |
|||
|
|||
std::vector<std::string> R = cd.ReduceSourcelist(CD, List); |
|||
EXPECT_TRUE(R.empty()); |
|||
|
|||
List.push_back(" wheezy main"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
ASSERT_EQ(1, R.size()); |
|||
EXPECT_EQ(" wheezy main", R[0]); |
|||
|
|||
List.push_back(" wheezy main"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
ASSERT_EQ(1, R.size()); |
|||
EXPECT_EQ(" wheezy main", R[0]); |
|||
|
|||
List.push_back(" wheezy contrib"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
ASSERT_EQ(1, R.size()); |
|||
EXPECT_EQ(" wheezy contrib main", R[0]); |
|||
|
|||
List.push_back(" wheezy-update contrib"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
ASSERT_EQ(2, R.size()); |
|||
EXPECT_EQ(" wheezy contrib main", R[0]); |
|||
EXPECT_EQ(" wheezy-update contrib", R[1]); |
|||
|
|||
List.push_back(" wheezy-update contrib"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
ASSERT_EQ(2, R.size()); |
|||
EXPECT_EQ(" wheezy contrib main", R[0]); |
|||
EXPECT_EQ(" wheezy-update contrib", R[1]); |
|||
|
|||
List.push_back(" wheezy-update non-free"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
ASSERT_EQ(2, R.size()); |
|||
EXPECT_EQ(" wheezy contrib main", R[0]); |
|||
EXPECT_EQ(" wheezy-update contrib non-free", R[1]); |
|||
|
|||
List.push_back(" wheezy-update main"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
ASSERT_EQ(2, R.size()); |
|||
EXPECT_EQ(" wheezy contrib main", R[0]); |
|||
EXPECT_EQ(" wheezy-update contrib main non-free", R[1]); |
|||
|
|||
List.push_back(" wheezy non-free"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
ASSERT_EQ(2, R.size()); |
|||
EXPECT_EQ(" wheezy contrib main non-free", R[0]); |
|||
EXPECT_EQ(" wheezy-update contrib main non-free", R[1]); |
|||
|
|||
List.push_back(" sid main"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
ASSERT_EQ(3, R.size()); |
|||
EXPECT_EQ(" sid main", R[0]); |
|||
EXPECT_EQ(" wheezy contrib main non-free", R[1]); |
|||
EXPECT_EQ(" wheezy-update contrib main non-free", R[2]); |
|||
|
|||
List.push_back(" sid main-reduce"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
ASSERT_EQ(3, R.size()); |
|||
EXPECT_EQ(" sid main main-reduce", R[0]); |
|||
EXPECT_EQ(" wheezy contrib main non-free", R[1]); |
|||
EXPECT_EQ(" wheezy-update contrib main non-free", R[2]); |
|||
} |
|||
TEST(CDROMTest, FindMountPointForDevice) |
|||
{ |
|||
char * tempfile; |
|||
FileFd fd; |
|||
createTemporaryFile("mountpoints", fd, &tempfile, |
|||
"rootfs / rootfs rw 0 0\n" |
|||
"sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0\n" |
|||
"sysfs0 /sys0 sysfs rw,nosuid,nodev,noexec,relatime 0 0\n" |
|||
"/dev/disk/by-uuid/fadcbc52-6284-4874-aaaa-dcee1f05fe21 / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0\n" |
|||
"/dev/sda1 /boot/efi vfat rw,nosuid,nodev,noexec,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=utf8,shortname=lower,quiet,utf8,errors=remount-ro,rw,nosuid,nodev,noexec,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=utf8,shortname=lower,quiet,utf8,errors=remount-ro,rw,nosuid,nodev,noexec,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=utf8,shortname=lower,quiet,utf8,errors=remount-ro,rw,nosuid,nodev,noexec,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=utf8,shortname=lower,quiet,utf8,errors=remount-ro 0 0\n" |
|||
"tmpfs /tmp tmpfs rw,nosuid,nodev,relatime 0 0\n"); |
|||
_config->Set("Dir::state::Mountpoints", tempfile); |
|||
|
|||
EXPECT_EQ("/", FindMountPointForDevice("rootfs")); |
|||
EXPECT_EQ("/", FindMountPointForDevice("/dev/disk/by-uuid/fadcbc52-6284-4874-aaaa-dcee1f05fe21")); |
|||
EXPECT_EQ("/sys", FindMountPointForDevice("sysfs")); |
|||
EXPECT_EQ("/sys0", FindMountPointForDevice("sysfs0")); |
|||
EXPECT_EQ("/boot/efi", FindMountPointForDevice("/dev/sda1")); |
|||
EXPECT_EQ("/tmp", FindMountPointForDevice("tmpfs")); |
|||
|
|||
unlink(tempfile); |
|||
free(tempfile); |
|||
} |
@ -1,26 +0,0 @@ |
|||
#include <config.h> |
|||
|
|||
#include <apt-pkg/cdromutl.h> |
|||
#include <apt-pkg/configuration.h> |
|||
|
|||
#include <string> |
|||
#include <vector> |
|||
|
|||
#include "assert.h" |
|||
|
|||
int main(int argc, char const *argv[]) { |
|||
if (argc != 2) { |
|||
std::cout << "One parameter expected - given " << argc << std::endl; |
|||
return 100; |
|||
} |
|||
|
|||
_config->Set("Dir::state::Mountpoints", argv[1]); |
|||
equals("/", FindMountPointForDevice("rootfs")); |
|||
equals("/", FindMountPointForDevice("/dev/disk/by-uuid/fadcbc52-6284-4874-aaaa-dcee1f05fe21")); |
|||
equals("/sys", FindMountPointForDevice("sysfs")); |
|||
equals("/sys0", FindMountPointForDevice("sysfs0")); |
|||
equals("/boot/efi", FindMountPointForDevice("/dev/sda1")); |
|||
equals("/tmp", FindMountPointForDevice("tmpfs")); |
|||
|
|||
return 0; |
|||
} |
@ -1,86 +0,0 @@ |
|||
#include <config.h> |
|||
|
|||
#include <apt-pkg/cdrom.h> |
|||
|
|||
#include <string> |
|||
#include <vector> |
|||
|
|||
#include "assert.h" |
|||
|
|||
class Cdrom : public pkgCdrom { |
|||
public: |
|||
std::vector<std::string> ReduceSourcelist(std::string CD,std::vector<std::string> List) { |
|||
pkgCdrom::ReduceSourcelist(CD, List); |
|||
return List; |
|||
} |
|||
}; |
|||
|
|||
int main() { |
|||
Cdrom cd; |
|||
std::vector<std::string> List; |
|||
std::string CD("/media/cdrom/"); |
|||
|
|||
std::vector<std::string> R = cd.ReduceSourcelist(CD, List); |
|||
equals(R.empty(), true); |
|||
|
|||
List.push_back(" wheezy main"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
equals(R.size(), 1); |
|||
equals(R[0], " wheezy main"); |
|||
|
|||
List.push_back(" wheezy main"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
equals(R.size(), 1); |
|||
equals(R[0], " wheezy main"); |
|||
|
|||
List.push_back(" wheezy contrib"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
equals(R.size(), 1); |
|||
equals(R[0], " wheezy contrib main"); |
|||
|
|||
List.push_back(" wheezy-update contrib"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
equals(R.size(), 2); |
|||
equals(R[0], " wheezy contrib main"); |
|||
equals(R[1], " wheezy-update contrib"); |
|||
|
|||
List.push_back(" wheezy-update contrib"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
equals(R.size(), 2); |
|||
equals(R[0], " wheezy contrib main"); |
|||
equals(R[1], " wheezy-update contrib"); |
|||
|
|||
List.push_back(" wheezy-update non-free"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
equals(R.size(), 2); |
|||
equals(R[0], " wheezy contrib main"); |
|||
equals(R[1], " wheezy-update contrib non-free"); |
|||
|
|||
List.push_back(" wheezy-update main"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
equals(R.size(), 2); |
|||
equals(R[0], " wheezy contrib main"); |
|||
equals(R[1], " wheezy-update contrib main non-free"); |
|||
|
|||
List.push_back(" wheezy non-free"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
equals(R.size(), 2); |
|||
equals(R[0], " wheezy contrib main non-free"); |
|||
equals(R[1], " wheezy-update contrib main non-free"); |
|||
|
|||
List.push_back(" sid main"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
equals(R.size(), 3); |
|||
equals(R[0], " sid main"); |
|||
equals(R[1], " wheezy contrib main non-free"); |
|||
equals(R[2], " wheezy-update contrib main non-free"); |
|||
|
|||
List.push_back(" sid main-reduce"); |
|||
R = cd.ReduceSourcelist(CD, List); |
|||
equals(R.size(), 3); |
|||
equals(R[0], " sid main main-reduce"); |
|||
equals(R[1], " wheezy contrib main non-free"); |
|||
equals(R[2], " wheezy-update contrib main non-free"); |
|||
|
|||
return 0; |
|||
} |
@ -1,41 +0,0 @@ |
|||
#include <config.h> |
|||
|
|||
#include <apt-pkg/cmndline.h> |
|||
#include <apt-pkg/configuration.h> |
|||
|
|||
#include <string> |
|||
|
|||
#include "assert.h" |
|||
|
|||
class CLT: public CommandLine { |
|||
|
|||
public: |
|||
std::string static AsString(const char * const * const argv, |
|||
unsigned int const argc) { |
|||
std::string const static conf = "Commandline::AsString"; |
|||
_config->Clear(conf); |
|||
SaveInConfig(argc, argv); |
|||
return _config->Find(conf); |
|||
} |
|||
}; |
|||
|
|||
#define CMD(y,z) equals(CLT::AsString(argv, y), z); |
|||
|
|||
int main() { |
|||
{ |
|||
const char* const argv[] = {"apt-get", "install", "-sf"}; |
|||
CMD(3, "apt-get install -sf"); |
|||
} |
|||
{ |
|||
const char* const argv[] = {"apt-cache", "-s", "apt", "-so", "Debug::test=Test"}; |
|||
CMD(5, "apt-cache -s apt -so Debug::test=Test"); |
|||
} |
|||
{ |
|||
const char* const argv[] = {"apt-cache", "-s", "apt", "-so", "Debug::test=Das ist ein Test"}; |
|||
CMD(5, "apt-cache -s apt -so Debug::test=\"Das ist ein Test\""); |
|||
} |
|||
{ |
|||
const char* const argv[] = {"apt-cache", "-s", "apt", "--hallo", "test=1.0"}; |
|||
CMD(5, "apt-cache -s apt --hallo test=1.0"); |
|||
} |
|||
} |
@ -0,0 +1,77 @@ |
|||
#include <apt-pkg/fileutl.h> |
|||
|
|||
#include <string> |
|||
|
|||
#include <unistd.h> |
|||
#include <sys/stat.h> |
|||
#include <sys/types.h> |
|||
#include <fcntl.h> |
|||
|
|||
#include <gtest/gtest.h> |
|||
|
|||
#include "file-helpers.h" |
|||
|
|||
void helperCreateTemporaryDirectory(std::string const &id, std::string &dir) |
|||
{ |
|||
std::string const strtempdir = GetTempDir().append("/apt-tests-").append(id).append(".XXXXXX"); |
|||
char * tempdir = strdup(strtempdir.c_str()); |
|||
ASSERT_STREQ(tempdir, mkdtemp(tempdir)); |
|||
dir = tempdir; |
|||
free(tempdir); |
|||
} |
|||
void helperRemoveDirectory(std::string const &dir) |
|||
{ |
|||
// basic sanity check to avoid removing random directories based on earlier failures
|
|||
if (dir.find("/apt-tests-") == std::string::npos || dir.find_first_of("*?") != std::string::npos) |
|||
FAIL() << "Directory '" << dir << "' seems invalid. It is therefore not removed!"; |
|||
else |
|||
ASSERT_EQ(0, system(std::string("rm -rf ").append(dir).c_str())); |
|||
} |
|||
void helperCreateFile(std::string const &dir, std::string const &name) |
|||
{ |
|||
std::string file = dir; |
|||
file.append("/"); |
|||
file.append(name); |
|||
int const fd = creat(file.c_str(), 0600); |
|||
ASSERT_NE(-1, fd); |
|||
close(fd); |
|||
} |
|||
void helperCreateDirectory(std::string const &dir, std::string const &name) |
|||
{ |
|||
std::string file = dir; |
|||
file.append("/"); |
|||
file.append(name); |
|||
ASSERT_TRUE(CreateDirectory(dir, file)); |
|||
} |
|||
void helperCreateLink(std::string const &dir, std::string const &targetname, std::string const &linkname) |
|||
{ |
|||
std::string target = dir; |
|||
target.append("/"); |
|||
target.append(targetname); |
|||
std::string link = dir; |
|||
link.append("/"); |
|||
link.append(linkname); |
|||
ASSERT_EQ(0, symlink(target.c_str(), link.c_str())); |
|||
} |
|||
void helperCreateTemporaryFile(std::string const &id, FileFd &fd, char * * const filename, char const * const content) |
|||
{ |
|||
std::string name("apt-test-"); |
|||
name.append(id).append(".XXXXXXXX"); |
|||
char * tempfile = strdup(name.c_str()); |
|||
int tempfile_fd = mkstemp(tempfile); |
|||
ASSERT_NE(-1, tempfile_fd); |
|||
if (filename != NULL) |
|||
*filename = tempfile; |
|||
else |
|||
{ |
|||
unlink(tempfile); |
|||
free(tempfile); |
|||
} |
|||
|
|||
EXPECT_TRUE(fd.OpenDescriptor(tempfile_fd, FileFd::ReadWrite)); |
|||
if (content != NULL) |
|||
{ |
|||
ASSERT_TRUE(fd.Write(content, strlen(content))); |
|||
fd.Seek(0); |
|||
} |
|||
} |
@ -0,0 +1,29 @@ |
|||
#ifndef APT_TESTS_FILE_HELPERS |
|||
#define APT_TESTS_FILE_HELPERS |
|||
|
|||
#include <string> |
|||
|
|||
#include <gtest/gtest.h> |
|||
|
|||
class FileFd; |
|||
|
|||
#define createTemporaryDirectory(id, dir) \ |
|||
ASSERT_NO_FATAL_FAILURE(helperCreateTemporaryDirectory(id, dir)) |
|||
void helperCreateTemporaryDirectory(std::string const &id, std::string &dir); |
|||
#define removeDirectory(dir) \ |
|||
ASSERT_NO_FATAL_FAILURE(helperRemoveDirectory(dir)) |
|||
void helperRemoveDirectory(std::string const &dir); |
|||
#define createFile(dir, name) \ |
|||
ASSERT_NO_FATAL_FAILURE(helperCreateFile(dir, name)) |
|||
void helperCreateFile(std::string const &dir, std::string const &name); |
|||
#define createDirectory(dir, name) \ |
|||
ASSERT_NO_FATAL_FAILURE(helperCreateDirectory(dir, name)) |
|||
void helperCreateDirectory(std::string const &dir, std::string const &name); |
|||
#define createLink(dir, targetname, linkname) \ |
|||
ASSERT_NO_FATAL_FAILURE(helperCreateLink(dir, targetname, linkname)) |
|||
void helperCreateLink(std::string const &dir, std::string const &targetname, std::string const &linkname); |
|||
#define createTemporaryFile(id, fd, filename, content) \ |
|||
ASSERT_NO_FATAL_FAILURE(helperCreateTemporaryFile(id, fd, filename, content)) |
|||
void helperCreateTemporaryFile(std::string const &id, FileFd &fd, char * * const filename, char const * const content); |
|||
|
|||
#endif |