Skip to content

Commit 3e8b3e8

Browse files
add a test for busted source info in symbol graph tool
1 parent bfaef28 commit 3e8b3e8

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %empty-directory(%t/Source)
3+
// RUN: %empty-directory(%t/NoSourceInfo.framework/Modules/NoSourceInfo.swiftmodule)
4+
// RUN: %empty-directory(%t/NoSourceInfo.framework/Modules/NoSourceInfo.swiftmodule/Project)
5+
6+
// RUN: cp %s %t/Source/Input.swift
7+
8+
// RUN: %target-swift-frontend -module-name NoSourceInfo -emit-module -emit-module-path %t/NoSourceInfo.framework/Modules/NoSourceInfo.swiftmodule/%target-swiftmodule-name -emit-module-doc-path %t/NoSourceInfo.framework/Modules/NoSourceInfo.swiftmodule/%target-swiftdoc-name -emit-module-interface-path %t/NoSourceInfo.framework/Modules/NoSourceInfo.swiftmodule/%target-swiftinterface-name -emit-module-source-info-path %t/NoSourceInfo.framework/Modules/NoSourceInfo.swiftmodule/Project/%target-swiftsourceinfo-name %t/Source/Input.swift
9+
10+
// RUN: mv %t/Source %t/MovedSource
11+
12+
// RUN: %target-swift-symbolgraph-extract -module-name NoSourceInfo -F %t -pretty-print -output-dir %t
13+
// RUN: %FileCheck %s --input-file %t/NoSourceInfo.symbols.json
14+
15+
// CHECK: s:12NoSourceInfo1SV
16+
// CHECK: docComment
17+
// CHECK: This is a test
18+
19+
/// This is a test
20+
public struct S {
21+
/// This is also a test
22+
public var x: Int
23+
}
24+
25+
/// writing some docs here
26+
open class C<Data> {
27+
/// writing more docs over there
28+
public init() {}
29+
}
30+
31+
open class CO: C<String> {
32+
override public init() { super.init() }
33+
}

0 commit comments

Comments
 (0)