Skip to content

Commit

Permalink
Add rustdoc test for const computed value
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Feb 19, 2022
1 parent c5ce3e1 commit 296adba
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/rustdoc/const-value-display.rs
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 296adba

Please sign in to comment.