Update generated doctests

Update generated doctests, change unit test to be different to doctest.
This commit is contained in:
riverbl 2024-08-28 19:42:11 +01:00
parent 6d3ef599f7
commit fbc9d8a675
2 changed files with 27 additions and 0 deletions

View file

@ -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,
}
"#,
);

View file

@ -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(