xref: /third_party/rust/crates/minimal-lexical/tests/mask_tests.rs (revision cbd624ad)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/rust/crates/minimal-lexical/tests/
1use minimal_lexical::mask;
2
3#[test]
4fn lower_n_mask_test() {
5    assert_eq!(mask::lower_n_mask(2), 0b11);
6}
7
8#[test]
9fn lower_n_halfway_test() {
10    assert_eq!(mask::lower_n_halfway(2), 0b10);
11}
12
13#[test]
14fn nth_bit_test() {
15    assert_eq!(mask::nth_bit(2), 0b100);
16}
17

Indexes created Thu Nov 07 10:32:03 CST 2024