MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_out_of_bounds

Function test_out_of_bounds

plugins/lsps-plugin/src/core/features.rs:128–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126
127 #[test]
128 fn test_out_of_bounds() {
129 let bitmap: &[u8] = &[0b11111111, 0b00000000]; // 16 bits total
130
131 assert_eq!(is_feature_bit_set(bitmap, 15), false); // Last valid bit (is 0)
132 assert_eq!(is_feature_bit_set(bitmap, 16), false); // Out of bounds
133 assert_eq!(is_feature_bit_set(bitmap, 100), false); // Way out of bounds
134 }
135
136 #[test]
137 fn test_empty_bitmap() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected