MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / load_dictionary

Method load_dictionary

extern/libcds/test/stress/framework/stress_test.cpp:55–81  ·  view source on GitHub ↗

static*/

Source from the content-addressed store, hash-verified

53
54
55 /*static*/ std::vector<std::string> stress_fixture::load_dictionary()
56 {
57 std::vector<std::string> arrString;
58
59 std::ifstream s;
60 char const* filename = "./dictionary.txt";
61 s.open( filename );
62 if ( !s.is_open()) {
63 std::cerr << "WARNING: Cannot open test file " << filename << std::endl;
64 return arrString;
65 }
66
67 std::string line;
68 std::getline( s, line );
69
70 arrString.reserve( std::stoul( line ));
71
72 while ( !s.eof()) {
73 std::getline( s, line );
74 if ( !line.empty())
75 arrString.push_back( std::move( line ));
76 }
77
78 s.close();
79
80 return arrString;
81 }
82} // namespace

Callers

nothing calls this directly

Calls 7

moveFunction · 0.50
openMethod · 0.45
reserveMethod · 0.45
eofMethod · 0.45
emptyMethod · 0.45
push_backMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected