| 44 | |
| 45 | template<size_t N, size_t M> |
| 46 | bool check_array(short (&lhs)[N][M], short (&rhs)[N][M], const char* name) |
| 47 | { |
| 48 | for (size_t i = 0; i < N; ++i) { |
| 49 | for (size_t j = 0; j < M; ++j) { |
| 50 | if (lhs[i][j] != rhs[i][j]) { |
| 51 | std::cout << "ERROR target's " << name << "[" << i << "][" << j |
| 52 | << "] (" << lhs[i][j] << ") != " << rhs[i][j] << std::endl; |
| 53 | return false; |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | return true; |
| 58 | } |
| 59 | |
| 60 | template<typename T> |
| 61 | bool checkVal(const T& lhs, const T& rhs, const char* name) |