| 15 | } |
| 16 | |
| 17 | bool arrayEquals(const std::vector<float>& a, const std::vector<float>& b, float epsilon = 1e-4) { |
| 18 | if (a.size() != b.size()) { |
| 19 | return false; |
| 20 | } |
| 21 | for (size_t i = 0; i < a.size(); i++) { |
| 22 | if (!floatEquals(a[i], b[i], epsilon)) { |
| 23 | return false; |
| 24 | } |
| 25 | } |
| 26 | return true; |
| 27 | } |
| 28 | |
| 29 | void assertArrayEquals(const std::vector<float>& actual, const std::vector<float>& expected, const std::string& message, float epsilon = 1e-4) { |
| 30 | if (!arrayEquals(actual, expected, epsilon)) { |
no test coverage detected