Translator tests: the fence word's placement is asserted at compile time
Clippy (assertions_on_constants) refused the runtime assert! of two constants in the_fence_word_lies_past_the_zero_range_s_reads; both are const blocks now, the word's alignment through is_multiple_of. Verified: clippy --cfg m2v_gpu at f42ed033e3, job m3-max-84724, named this one error; the three configurations rerun at this commit.
This commit is contained in:
1 parent
572cc17a70
commit
247a1b0263
1 file changed
+2
-2
@@ -203,8 +203,8 @@ fn a_seq_cst_fence_adds_to_its_scope_s_word_and_no_other_fence_does() {
|
||||
/// command buffer's reset command, whose index token binds the range with no bytes.
|
||||
#[test]
|
||||
fn the_fence_word_lies_past_the_zero_range_s_reads() {
|
||||
assert!(ZERO_RANGE_READ <= SEQ_CST_FENCE_WORD);
|
||||
assert_eq!(SEQ_CST_FENCE_WORD % 4, 0);
|
||||
const { assert!(ZERO_RANGE_READ <= SEQ_CST_FENCE_WORD) };
|
||||
const { assert!(SEQ_CST_FENCE_WORD.is_multiple_of(4)) };
|
||||
let layout = crate::pipeline::IndirectDrawLayout::new(2, 2).expect("a layout");
|
||||
let zero = 0x1000_u64;
|
||||
let command = layout.reset_command(0, zero);
|
||||
|
||||
Reference in new issue
Block a user