mirror of
https://github.com/mhx/dwarfs.git
synced 2025-08-04 02:06:22 -04:00
Improve speed of unit test
This commit is contained in:
parent
d5b52e98f6
commit
c288466b2a
@ -177,7 +177,7 @@ void basic_end_to_end_test(const std::string& compressor,
|
||||
|
||||
std::ostringstream logss;
|
||||
stream_logger lgr(logss); // TODO: mock
|
||||
lgr.set_policy<debug_logger_policy>();
|
||||
lgr.set_policy<prod_logger_policy>();
|
||||
|
||||
scanner s(lgr, wg, cfg,
|
||||
entry_factory::create(no_owner, no_time,
|
||||
|
@ -416,10 +416,11 @@ const std::string& loremipsum() { return s_loremipsum; }
|
||||
|
||||
std::string loremipsum(size_t size) {
|
||||
std::string str;
|
||||
while (str.size() < size) {
|
||||
str.reserve(size);
|
||||
while (str.size() + s_loremipsum.size() <= size) {
|
||||
str += s_loremipsum;
|
||||
}
|
||||
str.resize(size);
|
||||
str.append(s_loremipsum.data(), size - str.size());
|
||||
return str;
|
||||
}
|
||||
} // namespace test
|
||||
|
Loading…
x
Reference in New Issue
Block a user