mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 07:04:22 +00:00
Update generated doctests
Update generated doctests, change unit test to be different to doctest.
This commit is contained in:
parent
6d3ef599f7
commit
fbc9d8a675
2 changed files with 27 additions and 0 deletions
|
@ -100,6 +100,8 @@ enum TheEnum$0 {
|
|||
Bar,
|
||||
Baz = 42,
|
||||
Quux,
|
||||
FooBar = -5,
|
||||
FooBaz,
|
||||
}
|
||||
"#,
|
||||
r#"
|
||||
|
@ -108,6 +110,8 @@ enum TheEnum {
|
|||
Bar = 1,
|
||||
Baz = 42,
|
||||
Quux = 43,
|
||||
FooBar = -5,
|
||||
FooBaz = -4,
|
||||
}
|
||||
"#,
|
||||
);
|
||||
|
|
|
@ -909,6 +909,29 @@ fn qux(bar: Bar, baz: Baz) {}
|
|||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn doctest_explicit_enum_discriminant() {
|
||||
check_doc_test(
|
||||
"explicit_enum_discriminant",
|
||||
r#####"
|
||||
enum TheEnum$0 {
|
||||
Foo,
|
||||
Bar,
|
||||
Baz = 42,
|
||||
Quux,
|
||||
}
|
||||
"#####,
|
||||
r#####"
|
||||
enum TheEnum {
|
||||
Foo = 0,
|
||||
Bar = 1,
|
||||
Baz = 42,
|
||||
Quux = 43,
|
||||
}
|
||||
"#####,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn doctest_extract_expressions_from_format_string() {
|
||||
check_doc_test(
|
||||
|
|
Loading…
Reference in a new issue