35 #include <gtest/gtest.h> 50 ASSERT_EQ(res.
size, 1);
51 ASSERT_EQ(res.
data[0],
'A');
65 FILE*
f = fopen(path.c_str(),
"w");
69 for (
int i = 0; i < 1024*1024*50; ++i)
78 ASSERT_EQ(res.
size, 1024*1024*50);
93 ASSERT_GT(res.
size, 0);
107 r.
get(
"file://fail");
117 r.
get(
"package://roscpp");
127 r.
get(
"package://invalid_package_blah/test.xml");
136 int main(
int argc,
char **argv){
137 testing::InitGoogleTest(&argc, argv);
138 return RUN_ALL_TESTS();
Retrieves files from from a url. Caches a CURL handle so multiple accesses to a single url will keep ...
boost::shared_array< uint8_t > data
A combination of a pointer to data in memory along with the data's size.
int main(int argc, char **argv)
ROSLIB_DECL std::string getPath(const std::string &package_name)
MemoryResource get(const std::string &url)
Get a file and store it in memory.
TEST(Retriever, getByPackage)