/* * Copyright (c) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include "gtest/gtest.h" #include "log.h" #include "utils.h" using namespace testing::ext; class ActsUtilMsgApiTest : public testing::Test { protected: // SetUpTestCase: Testsuit setup, run before 1st testcase static void SetUpTestCase(void) { } // TearDownTestCase: Testsuit teardown, run after last testcase static void TearDownTestCase(void) { } // Testcase setup virtual void SetUp() { } // Testcase teardown virtual void TearDown() { } }; /** * @tc.number SUB_KERNEL_UTIL_MSG_FMTMSG_0100 * @tc.name test fmtmsg api * @tc.desc [C- SOFTWARE -0200] */ HWTEST_F(ActsUtilMsgApiTest, testFmtmsg0100, Function | MediumTest | Level1) { int returnVal = 0; returnVal = fmtmsg(MM_PRINT, "test fmtmsg:", MM_INFO, "hello fmtmsg", "call it", "fmtmsg"); LOGD(" fmtmsg returnVal:='%d'\n", returnVal); ASSERT_TRUE(MM_OK == returnVal) << "ErrInfo: fmtmsg returnVal:='" << returnVal << "'"; }