| 290 | class NullFreeArrayViewTest : public ArrayViewTest<false> {}; |
| 291 | |
| 292 | TEST_F(NullableArrayViewTest, intArray) { |
| 293 | auto testItem = [&](int i, int j, auto item) { |
| 294 | // Test has_value. |
| 295 | ASSERT_EQ(arrayDataBigInt[i][j].has_value(), item.has_value()); |
| 296 | |
| 297 | // Test bool implicit cast. |
| 298 | ASSERT_EQ(arrayDataBigInt[i][j].has_value(), static_cast<bool>(item)); |
| 299 | |
| 300 | if (arrayDataBigInt[i][j].has_value()) { |
| 301 | // Test * operator. |
| 302 | ASSERT_EQ(arrayDataBigInt[i][j].value(), *item) << i << j; |
| 303 | |
| 304 | // Test value(). |
| 305 | ASSERT_EQ(arrayDataBigInt[i][j].value(), item.value()); |
| 306 | } |
| 307 | ASSERT_TRUE(item == arrayDataBigInt[i][j]); |
| 308 | }; |
| 309 | |
| 310 | intArrayTest(testItem); |
| 311 | } |
| 312 | |
| 313 | TEST_F(NullableArrayViewTest, encoded) { |
| 314 | encodedTest(); |
nothing calls this directly
no test coverage detected