| 15 | namespace |
| 16 | { |
| 17 | void CompareFloats(const std::string& floats1, const std::string& floats2) |
| 18 | { |
| 19 | // Number comparison. |
| 20 | const StringUtils::StringVec strings1 = StringUtils::SplitByWhiteSpaces(StringUtils::Trim(floats1)); |
| 21 | std::vector<float> numbers1; |
| 22 | OCIO::StringVecToFloatVec(numbers1, strings1); |
| 23 | |
| 24 | const StringUtils::StringVec strings2 = StringUtils::SplitByWhiteSpaces(StringUtils::Trim(floats2)); |
| 25 | std::vector<float> numbers2; |
| 26 | OCIO::StringVecToFloatVec(numbers2, strings2); |
| 27 | |
| 28 | OCIO_CHECK_EQUAL(numbers1.size(), numbers2.size()); |
| 29 | for (unsigned int j = 0; j<numbers1.size(); ++j) |
| 30 | { |
| 31 | OCIO_CHECK_CLOSE(numbers1[j], numbers2[j], 1e-5f); |
| 32 | } |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | OCIO_ADD_TEST(Baker, bake_3dlut) |
no test coverage detected