Update tests accordingly
This commit is contained in:
parent
d06f72d062
commit
bd704baaf1
3 changed files with 33 additions and 8 deletions
|
@ -13,14 +13,16 @@
|
|||
pub trait Foo {
|
||||
// @has assoc_consts/trait.Foo.html '//*[@class="rust trait"]' \
|
||||
// 'const FOO: usize;'
|
||||
// @has - '//*[@id="associatedconstant.FOO"]' 'const FOO'
|
||||
const FOO: usize;
|
||||
// @has - '//*[@id="associatedconstant.FOO"]' 'const FOO: usize'
|
||||
// @has - '//*[@class="docblock"]' 'FOO: usize = 12'
|
||||
const FOO: usize = 12;
|
||||
}
|
||||
|
||||
pub struct Bar;
|
||||
|
||||
impl Bar {
|
||||
// @has assoc_consts/struct.Bar.html '//*[@id="associatedconstant.BAR"]' \
|
||||
// 'const BAR: usize = 3'
|
||||
// 'const BAR: usize'
|
||||
// @has - '//*[@class="docblock"]' 'BAR: usize = 3'
|
||||
pub const BAR: usize = 3;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,8 @@ pub trait Bar {
|
|||
// @has - '//*[@id="associatedtype.Bar"]' 'type Bar = ()'
|
||||
// @has - '//*[@href="#associatedtype.Bar"]' 'Bar'
|
||||
type Bar = ();
|
||||
// @has - '//*[@id="associatedconstant.Baz"]' 'const Baz: usize = 7'
|
||||
// @has - '//*[@id="associatedconstant.Baz"]' 'const Baz: usize'
|
||||
// @has - '//*[@class="docblock"]' 'Baz: usize = 7'
|
||||
// @has - '//*[@href="#associatedconstant.Baz"]' 'Baz'
|
||||
const Baz: usize = 7;
|
||||
// @has - '//*[@id="tymethod.bar"]' 'fn bar'
|
||||
|
|
|
@ -28,18 +28,40 @@ macro_rules! make {
|
|||
fn ignore(_: &X) {}
|
||||
const C: X;
|
||||
// @has issue_33302/trait.T.html \
|
||||
// '//*[@class="rust trait"]' 'const D: i32 = 4 * 4;'
|
||||
// @has - '//*[@id="associatedconstant.D"]' 'const D: i32 = 4 * 4'
|
||||
// '//*[@class="rust trait"]' 'const D: i32'
|
||||
// @has - '//*[@class="docblock"]' 'D: i32 = 4 * 4'
|
||||
// @has - '//*[@id="associatedconstant.D"]' 'const D: i32'
|
||||
const D: i32 = ($n * $n);
|
||||
}
|
||||
|
||||
// @has issue_33302/struct.S.html \
|
||||
// '//h3[@class="impl"]' 'impl T<[i32; 16]> for S'
|
||||
// @has - '//*[@id="associatedconstant.C"]' 'const C: [i32; 16] = [0; 4 * 4]'
|
||||
// @has - '//*[@id="associatedconstant.D"]' 'const D: i32 = 4 * 4'
|
||||
// @has - '//*[@id="associatedconstant.C"]' 'const C: [i32; 16]'
|
||||
// @has - '//*[@id="associatedconstant.D"]' 'const D: i32'
|
||||
// @has - '//*[@class="docblock"]' 'C: [i32; 16] = [0; 4 * 4]'
|
||||
impl T<[i32; ($n * $n)]> for S {
|
||||
const C: [i32; ($n * $n)] = [0; ($n * $n)];
|
||||
}
|
||||
|
||||
// @has issue_33302/struct.S.html \
|
||||
// '//h3[@class="impl"]' 'impl T<[i32; 16]> for S'
|
||||
// @has - '//*[@id="associatedconstant.C-1"]' 'const C: (i32,)'
|
||||
// @has - '//*[@id="associatedconstant.D-1"]' 'const D: i32'
|
||||
// @has - '//*[@class="docblock"]' 'C: (i32,) = (4,)'
|
||||
impl T<(i32,)> for S {
|
||||
const C: (i32,) = ($n,);
|
||||
}
|
||||
|
||||
// @has issue_33302/struct.S.html \
|
||||
// '//h3[@class="impl"]' 'impl T<(i32, i32)> for S'
|
||||
// @has - '//*[@id="associatedconstant.C-2"]' 'const C: (i32, i32)'
|
||||
// @has - '//*[@id="associatedconstant.D-2"]' 'const D: i32'
|
||||
// @has - '//*[@class="docblock"]' 'C: (i32, i32) = (4, 4)'
|
||||
// @has - '//*[@class="docblock"]' 'D: i32 = 4 / 4'
|
||||
impl T<(i32, i32)> for S {
|
||||
const C: (i32, i32) = ($n, $n);
|
||||
const D: i32 = ($n / $n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue