Add rustdoc test for const computed value

This commit is contained in:
Guillaume Gomez 2022-02-17 17:59:18 +01:00
parent c5ce3e1dbc
commit 296adbac0a

View 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;