blob: 9eb9bac3e4127819257c2501384451528fa3ff69 [file] [log] [blame]
Parker Schuh0ff777c2017-02-19 15:01:13 -08001#include "aos/vision/blob/transpose.h"
Parker Schuh0ff777c2017-02-19 15:01:13 -08002
Parker Schuh0ff777c2017-02-19 15:01:13 -08003#include <string>
Austin Schuh60e77942022-05-16 17:48:24 -07004
Parker Schuh0ff777c2017-02-19 15:01:13 -08005#include "gtest/gtest.h"
6
Philipp Schrader790cb542023-07-05 21:06:52 -07007#include "aos/vision/blob/test_utils.h"
8
Stephan Pleinesf63bde82024-01-13 15:59:33 -08009namespace aos::vision {
Parker Schuh0ff777c2017-02-19 15:01:13 -080010
11TEST(TransposeTest, Tranpspose) {
12 RangeImage img = LoadFromTestData(20, R"(
13 -----------
14 ----- ----
15 ------------
16 -------------
17 ------------
18 ----------
19 ------------
20 ---------
21)");
22
23 auto b = Transpose(img);
24 auto c = Transpose(b);
25 EXPECT_EQ(ShortDebugPrint({img}), ShortDebugPrint({c}));
26}
27
Stephan Pleinesf63bde82024-01-13 15:59:33 -080028} // namespace aos::vision