Skip to content

Commit 591882a

Browse files
committed
add test
1 parent e8c3eef commit 591882a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

_xtool/internal/config/config.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,13 @@ func PkgHfileInfo(includes []string, args []string, mix bool) *PkgHfilesInfo {
6060
// not in the first level include maybe impl or third hfile
6161
filename := filepath.Clean(clang.GoString(inced.FileName()))
6262

63-
if len(incins) <= 1 {
63+
if len(incins) == 1 {
6464
info.Inters = append(info.Inters, filename)
6565
}
6666

67-
fmt.Println(filename, len(incins))
67+
for _, inc := range incins {
68+
fmt.Println(filename, clang.GoString(inc.File().FileName()))
69+
}
6870

6971
ref, ok := refMap[filename]
7072
if !ok {
@@ -88,7 +90,7 @@ func PkgHfileInfo(includes []string, args []string, mix bool) *PkgHfilesInfo {
8890
}
8991

9092
for filename, ref := range refMap {
91-
if ref <= 1 {
93+
if ref == 1 {
9294
continue
9395
}
9496
fmt.Println(filename, ref)

0 commit comments

Comments
 (0)