Verifies that each decimal is between min and max
| 228 | |
| 229 | // Verifies that each decimal is between min and max |
| 230 | void VerifyDecimalsBetween(const Datum& d, int64_t min, int64_t max) { |
| 231 | int64_t length = d.length(); |
| 232 | const Decimal128* decs = |
| 233 | reinterpret_cast<const Decimal128*>(d.array()->buffers[1]->data()); |
| 234 | for (int64_t i = 0; i < length; i++) { |
| 235 | int64_t val = static_cast<int64_t>(decs[i]); |
| 236 | ASSERT_LE(val, max); |
| 237 | ASSERT_GE(val, min); |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | // Verifies that each variable-length row is a series of words separated by |
| 242 | // spaces. Number of words is determined by the number of spaces. |
no test coverage detected