| 49 | * - Positive testing by indexing on X,Y indexing |
| 50 | * */ |
| 51 | TEST_CASE(SubTensorCreation, framework::DatasetMode::ALL) |
| 52 | { |
| 53 | // Create tensor info |
| 54 | TensorInfo info(TensorShape(23U, 17U, 3U), 1, DataType::F32); |
| 55 | |
| 56 | // Negative testing on X |
| 57 | ARM_COMPUTE_EXPECT_THROW(SubTensorInfo(&info, TensorShape(13U, 17U, 3U), Coordinates(24, 0, 0)), |
| 58 | framework::LogLevel::ERRORS); |
| 59 | ARM_COMPUTE_EXPECT_THROW(SubTensorInfo(&info, TensorShape(13U, 17U, 3U), Coordinates(15, 0, 0)), |
| 60 | framework::LogLevel::ERRORS); |
| 61 | |
| 62 | // Negative testing on Y |
| 63 | ARM_COMPUTE_EXPECT_THROW(SubTensorInfo(&info, TensorShape(23U, 8U, 3U), Coordinates(0, 18, 0)), |
| 64 | framework::LogLevel::ERRORS); |
| 65 | ARM_COMPUTE_EXPECT_THROW(SubTensorInfo(&info, TensorShape(23U, 8U, 3U), Coordinates(0, 13, 0)), |
| 66 | framework::LogLevel::ERRORS); |
| 67 | |
| 68 | // Positive testing on XY indexing |
| 69 | ARM_COMPUTE_EXPECT_NO_THROW(SubTensorInfo(&info, TensorShape(4U, 3U, 2U), Coordinates(5, 2, 1)), |
| 70 | framework::LogLevel::ERRORS); |
| 71 | } |
| 72 | |
| 73 | /** Validate when extending padding on sub-tensor |
| 74 | * |
nothing calls this directly
no test coverage detected