Пример #1
0
TEST(testFiles, testFilesSanity)
{
  fwk::utils::init();

  system("mkdir -p AAtest/sub");
  system("touch AAtest/1");
  system("touch AAtest/2");
  system("touch AAtest/3");

  FileList::Ptr files;

  files = FileList::getFilesFromDirectory("foo", fwk::filter_none);
  ASSERT_FALSE(files);

  files = FileList::getFilesFromDirectory("AAtest", fwk::filter_none);
  ASSERT_TRUE(files);
  ASSERT_EQ(files->size(), 3U);

  system("rm -fr AAtest");
}
Пример #2
0
int test_main( int, char *[] )             // note the name!
{
  fwk::utils::init();

	system( "mkdir -p AAtest/sub" );
	system( "touch AAtest/1" );
	system( "touch AAtest/2" );
	system( "touch AAtest/3" );

	FileList::Ptr files;
	
	files = FileList::getFilesFromDirectory("foo", fwk::filter_none);
	BOOST_CHECK( !files );

	files = FileList::getFilesFromDirectory("AAtest", fwk::filter_none);
	BOOST_CHECK( files );
	BOOST_CHECK( files->size() == 3 );
	
	system( "rm -fr AAtest" );
	return 0;
}