diff options
author | Nan Zhou <nanzhoumails@gmail.com> | 2022-06-14 02:58:49 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-06-18 22:36:51 +0300 |
commit | df91ea73d193d7a0562f072043c44e1b843767d4 (patch) | |
tree | 7d7d3c05815e0d71ce0872ca02eb0424f809951d /src | |
parent | 4e11f7029bc62e9aaf035bee0631a2394881ee2e (diff) | |
download | bmcweb-df91ea73d193d7a0562f072043c44e1b843767d4.tar.xz |
openbmc_jtag_rest_test: move to openbmc_dbus_rest
This commit does nothing but moving test codes from
openbmc_jtag_rest_test.cc, a very old test file whose name is obsolote
now, to a more recent and well maintained unit test file
(openbmc_dbus_rest_test.cc).
Tested: unit test passed.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I3709d18c8ef5cbba5b3f6490a1e9d1798dfc8b52
Diffstat (limited to 'src')
-rw-r--r-- | src/openbmc_jtag_rest_test.cpp | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/openbmc_jtag_rest_test.cpp b/src/openbmc_jtag_rest_test.cpp deleted file mode 100644 index cb262e05f1..0000000000 --- a/src/openbmc_jtag_rest_test.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "openbmc_dbus_rest.hpp" - -#include "gmock/gmock.h" -#include "gtest/gtest.h" - -TEST(OpenBmcDbusTest, TestArgSplit) -{ - // test the basic types - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("x"), - ::testing::ElementsAre("x")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("y"), - ::testing::ElementsAre("y")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("b"), - ::testing::ElementsAre("b")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("n"), - ::testing::ElementsAre("n")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("q"), - ::testing::ElementsAre("q")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("i"), - ::testing::ElementsAre("i")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("u"), - ::testing::ElementsAre("u")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("x"), - ::testing::ElementsAre("x")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("t"), - ::testing::ElementsAre("t")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("d"), - ::testing::ElementsAre("d")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("h"), - ::testing::ElementsAre("h")); - // test arrays - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("ai"), - ::testing::ElementsAre("ai")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("ax"), - ::testing::ElementsAre("ax")); - // test tuples - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("(sss)"), - ::testing::ElementsAre("(sss)")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("(sss)b"), - ::testing::ElementsAre("(sss)", "b")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("b(sss)"), - ::testing::ElementsAre("b", "(sss)")); - - // Test nested types - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("a{si}b"), - ::testing::ElementsAre("a{si}", "b")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("a(sss)b"), - ::testing::ElementsAre("a(sss)", "b")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("aa{si}b"), - ::testing::ElementsAre("aa{si}", "b")); - EXPECT_THAT(crow::openbmc_mapper::dbusArgSplit("i{si}b"), - ::testing::ElementsAre("i", "{si}", "b")); -} |