• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "functionalext.h"
16 #include "common.h"
17 
VersionsTest_testCase1()18 static void VersionsTest_testCase1() {
19     // get versioned symbol from each lib
20     EXPECT_EQ(__func__, 1, get_valA_fromA());
21     EXPECT_EQ(__func__, 2, get_valB_fromB());
22     // cross getting val
23     EXPECT_EQ(__func__, 1, get_valA_fromB());
24     EXPECT_EQ(__func__, 2, get_valB_fromA());
25 }
26 
VersionsTest_testCase2()27 static void VersionsTest_testCase2() {
28     // different names, same versions
29     EXPECT_EQ(__func__, 3, duplicate_a);
30     EXPECT_EQ(__func__, 4, duplicate_b);
31     // same names, different versions
32     EXPECT_EQ(__func__, 5, duplicate_1);
33     // same names, same versions
34     EXPECT_EQ(__func__, 7, duplicate_2);
35 }
36 
main(int argc,char ** argv)37 int main(int argc, char **argv) {
38     VersionsTest_testCase1();
39     VersionsTest_testCase2();
40     return t_status;
41 }
42