blob: a4a970508d17379c64537bb4d90d9e53606ef976 [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
3#include <algorithm>
4#include <string>
Austin Schuh60e77942022-05-16 17:48:24 -07005
Parker Schuh0ff777c2017-02-19 15:01:13 -08006#include "gtest/gtest.h"
7
Philipp Schrader790cb542023-07-05 21:06:52 -07008#include "aos/vision/blob/test_utils.h"
9
Stephan Pleinesf63bde82024-01-13 15:59:33 -080010namespace aos::vision {
Parker Schuh0ff777c2017-02-19 15:01:13 -080011
12TEST(TransposeTest, Tranpspose) {
13 RangeImage img = LoadFromTestData(20, R"(
14 -----------
15 ----- ----
16 ------------
17 -------------
18 ------------
19 ----------
20 ------------
21 ---------
22)");
23
24 auto b = Transpose(img);
25 auto c = Transpose(b);
26 EXPECT_EQ(ShortDebugPrint({img}), ShortDebugPrint({c}));
27}
28
Stephan Pleinesf63bde82024-01-13 15:59:33 -080029} // namespace aos::vision