From df91ea73d193d7a0562f072043c44e1b843767d4 Mon Sep 17 00:00:00 2001 From: Nan Zhou Date: Mon, 13 Jun 2022 23:58:49 +0000 Subject: 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 Change-Id: I3709d18c8ef5cbba5b3f6490a1e9d1798dfc8b52 --- src/openbmc_jtag_rest_test.cpp | 53 ------------------------------------------ 1 file changed, 53 deletions(-) delete mode 100644 src/openbmc_jtag_rest_test.cpp (limited to 'src') 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")); -} -- cgit v1.2.3