Parker Schuh | 0ff777c | 2017-02-19 15:01:13 -0800 | [diff] [blame] | 1 | #include "aos/vision/blob/transpose.h" |
Parker Schuh | 0ff777c | 2017-02-19 15:01:13 -0800 | [diff] [blame] | 2 | |
| 3 | #include <algorithm> |
| 4 | #include <string> |
Austin Schuh | 60e7794 | 2022-05-16 17:48:24 -0700 | [diff] [blame] | 5 | |
Parker Schuh | 0ff777c | 2017-02-19 15:01:13 -0800 | [diff] [blame] | 6 | #include "gtest/gtest.h" |
| 7 | |
Philipp Schrader | 790cb54 | 2023-07-05 21:06:52 -0700 | [diff] [blame^] | 8 | #include "aos/vision/blob/test_utils.h" |
| 9 | |
Parker Schuh | 0ff777c | 2017-02-19 15:01:13 -0800 | [diff] [blame] | 10 | namespace aos { |
| 11 | namespace vision { |
| 12 | |
| 13 | TEST(TransposeTest, Tranpspose) { |
| 14 | RangeImage img = LoadFromTestData(20, R"( |
| 15 | ----------- |
| 16 | ----- ---- |
| 17 | ------------ |
| 18 | ------------- |
| 19 | ------------ |
| 20 | ---------- |
| 21 | ------------ |
| 22 | --------- |
| 23 | )"); |
| 24 | |
| 25 | auto b = Transpose(img); |
| 26 | auto c = Transpose(b); |
| 27 | EXPECT_EQ(ShortDebugPrint({img}), ShortDebugPrint({c})); |
| 28 | } |
| 29 | |
| 30 | } // namespace vision |
| 31 | } // namespace aos |