Add test for primitive search
This commit is contained in:
parent
198e3aba8f
commit
d5243e3a97
25
src/test/rustdoc-js/primitive.js
Normal file
25
src/test/rustdoc-js/primitive.js
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// exact-check
|
||||||
|
|
||||||
|
const QUERY = [
|
||||||
|
"i32",
|
||||||
|
"str",
|
||||||
|
"TotoIsSomewhere",
|
||||||
|
];
|
||||||
|
|
||||||
|
const EXPECTED = [
|
||||||
|
{
|
||||||
|
'in_args': [
|
||||||
|
{ 'path': 'primitive', 'name': 'foo' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'returned': [
|
||||||
|
{ 'path': 'primitive', 'name': 'foo' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'others': [],
|
||||||
|
'in_args': [],
|
||||||
|
'returned': [],
|
||||||
|
},
|
||||||
|
];
|
5
src/test/rustdoc-js/primitive.rs
Normal file
5
src/test/rustdoc-js/primitive.rs
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
pub fn foo(i: i32) -> &'static str {
|
||||||
|
"hello"
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn foo2<TotoIsSomewhere>(i: &TotoIsSomewhere, j: TotoIsSomewhere) {}
|
Loading…
x
Reference in New Issue
Block a user