| 42 | } |
| 43 | |
| 44 | bool StringFloatVecClose(std::string value, std::string expected, float eps) |
| 45 | { |
| 46 | std::vector<float> a; |
| 47 | std::vector<float> b; |
| 48 | if (StringVecToFloatVec(a, StringUtils::SplitByWhiteSpaces(value)) && |
| 49 | StringVecToFloatVec(b, StringUtils::SplitByWhiteSpaces(expected))) |
| 50 | { |
| 51 | if (a.size() == b.size()) |
| 52 | { |
| 53 | for(unsigned int i = 0; i < a.size(); i++) |
| 54 | { |
| 55 | if (std::abs(a[i] - b[i]) >= eps) |
| 56 | { |
| 57 | return false; |
| 58 | } |
| 59 | } |
| 60 | return true; |
| 61 | } |
| 62 | } |
| 63 | return false; |
| 64 | } |
| 65 | |
| 66 | |
| 67 | int unit_test_failures{ 0 }; |
nothing calls this directly
no test coverage detected