1 /*
2 * Copyright (C) 2025 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15 #include <cstdio>
16 #include <string>
17
18 #include "functionalext.h"
19 #include "testdlopen.h"
20
21 static const char *fileName = "libadlt_base_dlopen_c_lib.so";
22
DlopenCTests_TestGetVer()23 static void DlopenCTests_TestGetVer() {
24 EXPECT_EQ(__func__, 1, testdlopen::testVer(fileName));
25 }
26
DlopenCTests_TestPrintf()27 static void DlopenCTests_TestPrintf() {
28 EXPECT_EQ(__func__, 0, testdlopen::testPrintf(fileName, "some text\n"));
29 }
30
DlopenCTests_TestMax()31 static void DlopenCTests_TestMax() {
32 EXPECT_EQ(__func__, 2, testdlopen::testMax(fileName, 1, 2));
33 }
34
main(int argc,char ** argv)35 int main(int argc, char **argv) {
36 DlopenCTests_TestGetVer();
37 DlopenCTests_TestPrintf();
38 DlopenCTests_TestMax();
39 return t_status;
40 }
41
42