-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatic_tests_internals.cpp
More file actions
28 lines (23 loc) · 959 Bytes
/
static_tests_internals.cpp
File metadata and controls
28 lines (23 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
* MIT License
* Copyright (c) 2025 Youcef Lemsafer
* See LICENSE file for more details.
* Creation date: April 2025.
*/
#include "lfp.hpp"
constexpr lfp::details::bitmask_impl<uint64_t, 7> mask_7;
static_assert(mask_7.size() == 56);
static_assert(mask_7.offset(49) == 0);
static_assert(mask_7.offset(77) == 7);
static_assert(mask_7.offset(91) == 11);
static_assert(mask_7.offset(119) == 18);
static_assert(mask_7.offset(133) == 22);
static_assert(mask_7.offset(259) == 0);
static_assert(mask_7.word_at(0) ==
// 0 7 11 18 22 29 41 44 56 63
// v v v v v v v v v v
0b0111111011101111110111011111101111111111101101111111111101111110);
static_assert(mask_7.word_at(26) ==
0b1110111111111110110111111111110111111011101111110111011111101111);
static_assert(mask_7.word_at(55) ==
0b1011111101110111111011101111110111111111110110111111111110111111);