Skip to content

Commit a9b0bf2

Browse files
committed
QuickDoc: add test of type documentation
1 parent 41ebeaa commit a9b0bf2

File tree

5 files changed

+35
-0
lines changed

5 files changed

+35
-0
lines changed

testData/doc/typeSpec.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package main
2+
3+
// my comment
4+
type MyType int64
5+
6+
func Test(t MyTy<caret>pe) {
7+
8+
}

testData/doc/typeSpec.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<b>type MyType</b>
2+
<p>my comment
3+
</p>
4+
5+
=====
6+
https://godoc.org/null#MyType

testData/doc/typeTopDefinition.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package main
2+
3+
// my comment
4+
type (
5+
// my inner comment
6+
MyType1 int64
7+
MyType2 int64
8+
)
9+
10+
func Test(t MyTy<caret>pe1) {
11+
12+
}

testData/doc/typeTopDefinition.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<b>type MyType1</b>
2+
<p>my inner comment
3+
</p>
4+
5+
=====
6+
https://godoc.org/null#MyType1

tests/com/goide/GoDocumentationProviderTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ protected LightProjectDescriptor getProjectDescriptor() {
4747
public void testTypeResultDefinition() { doTest(); }
4848
public void testMultilineTypeListDefinition() { doTest(); }
4949
public void testSignature() { doTest(); }
50+
public void testTypeSpec() { doTest(); }
51+
public void testTypeTopDefinition() { doTest(); }
52+
5053

5154
public void testMultiBlockDoc() { doConverterTest(); }
5255
public void testIndentedBlock() { doConverterTest(); }

0 commit comments

Comments
 (0)