Debian Codegraph @

src/tests/kydiagnostics-gtest/kydiagnostics-gtest.cpp

raw
1 /*
2 * Copyright (C) 2024-2025, KylinSoft Co., Ltd.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 3 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this library. If not, see <https://www.gnu.org/licenses/>.
16 *
17 * Authors: Yunhe Liu <[email protected]>
18 *
19 */
20 #include <stdio.h>
21 #include <string.h>
22
23 #include <gtest/gtest.h>
24 #include "../cpp_stub/src/stub.h"
25 #include "../../diagnostics/libkydiagnostics.h"
26
27 TEST(TestSuite1, kydiagnostics)
28 {
29 char appName[] = "kylin-font-viewer";
30 char messageType[] = "FunctionType";
31
32 KBuriedPoint pt[2];
33 pt[0].key = "testkey";
34 pt[0].value = "testvalue";
35 pt[1].key = "testkey1";
36 pt[1].value = "testvalue1";
37
38 if (kdk_buried_point(appName, messageType, pt, 2))
39 {
40 printf("buried point fail !\n");
41 return;
42 }
43
44 printf("buried point success !\n");
45 }