MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / TEST_CASE

Function TEST_CASE

tests/validation/UNIT/SubTensorInfo.cpp:51–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 * - Positive testing by indexing on X,Y indexing
50 * */
51TEST_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 *

Callers

nothing calls this directly

Calls 9

SubTensorInfoClass · 0.85
TensorShapeClass · 0.50
CoordinatesClass · 0.50
extend_paddingMethod · 0.45
uniformMethod · 0.45
paddingMethod · 0.45
is_dynamicMethod · 0.45

Tested by

no test coverage detected