Skip to content

Commit d5243e3

Browse files
Add test for primitive search
1 parent 198e3ab commit d5243e3

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

src/test/rustdoc-js/primitive.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// exact-check
2+
3+
const QUERY = [
4+
"i32",
5+
"str",
6+
"TotoIsSomewhere",
7+
];
8+
9+
const EXPECTED = [
10+
{
11+
'in_args': [
12+
{ 'path': 'primitive', 'name': 'foo' },
13+
],
14+
},
15+
{
16+
'returned': [
17+
{ 'path': 'primitive', 'name': 'foo' },
18+
],
19+
},
20+
{
21+
'others': [],
22+
'in_args': [],
23+
'returned': [],
24+
},
25+
];

src/test/rustdoc-js/primitive.rs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pub fn foo(i: i32) -> &'static str {
2+
"hello"
3+
}
4+
5+
pub fn foo2<TotoIsSomewhere>(i: &TotoIsSomewhere, j: TotoIsSomewhere) {}

0 commit comments

Comments
 (0)