Skip to content

Commit

Permalink
test stub hover documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Mar 30, 2024
1 parent b43af6c commit 103fc33
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/tests/documentation.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ fn documentation() testing.Tester {
mut t := testing.with_name('documentation')

t.documentation_test('rendered', 'documentation/rendered.v')
t.documentation_test('stubs', 'documentation/stubs.v')

return t
}
2 changes: 2 additions & 0 deletions src/tests/testdata/documentation/stubs.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
type Foo = v/*caret*/oidptr

7 changes: 7 additions & 0 deletions src/tests/testdata/documentation/stubs.v.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Module: **stubs**
```v
pub type voidptr = voidptr
```

voidptr is an untyped pointer. You can pass any other type of pointer value, to a function that accepts a voidptr.
Mostly used for [C interoperability](https://docs.vosca.dev/advanced-concepts/v-and-c.html).

0 comments on commit 103fc33

Please sign in to comment.