Add unit tests for most of util.cpp

This commit is contained in:
2021-07-30 13:22:23 -04:00
parent 49484cf2f0
commit ec4d5fc3da
7 changed files with 118 additions and 63 deletions

View File

@@ -282,11 +282,11 @@ std::string AnimStep::debug_string() const {
bool AnimStep::from_string(const std::string &config) {
clear();
util::stringvec parts = util::split(config, ' ');
util::StringVec parts = util::split(config, ' ');
for (int i = 0; i < int(parts.size()); i++) {
const std::string &part = parts[i];
if (part == "") continue;
util::stringvec lr = util::split(part, '=');
util::StringVec lr = util::split(part, '=');
if (lr.size() != 2) return false;
const std::string &key = lr[0];
const std::string &val = lr[1];