Add rustdoc test for const computed value
This commit is contained in:
parent
c5ce3e1dbc
commit
296adbac0a
1 changed files with 9 additions and 0 deletions
9
src/test/rustdoc/const-value-display.rs
Normal file
9
src/test/rustdoc/const-value-display.rs
Normal file
|
@ -0,0 +1,9 @@
|
|||
#![crate_name = "foo"]
|
||||
|
||||
// @has 'foo/constant.HOUR_IN_SECONDS.html'
|
||||
// @has - '//*[@class="docblock item-decl"]//code' 'pub const HOUR_IN_SECONDS: u64 = 60 * 60; // 3_600u64'
|
||||
pub const HOUR_IN_SECONDS: u64 = 60 * 60;
|
||||
|
||||
// @has 'foo/constant.NEGATIVE.html'
|
||||
// @has - '//*[@class="docblock item-decl"]//code' 'pub const NEGATIVE: i64 = -60 * 60; // -3_600i64'
|
||||
pub const NEGATIVE: i64 = -60 * 60;
|
Loading…
Add table
Reference in a new issue