• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacks-network / stacks-core / 23757460166

30 Mar 2026 05:08PM UTC coverage: 46.858% (-38.9%) from 85.712%
23757460166

Pull #7058

github

cb13d9
web-flow
Merge 5b10bfbb9 into 7a9774e50
Pull Request #7058: test: fix flakiness in `check_capitulate_miner_view`

101943 of 217556 relevant lines covered (46.86%)

12736976.58 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/stackslib/src/chainstate/stacks/index/test/node_patch.rs
1
// Copyright (C) 2026 Stacks Open Internet Foundation
2
//
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, either version 3 of the License, or
6
// (at your option) any later version.
7
//
8
// This program is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
// GNU General Public License for more details.
12
//
13
// You should have received a copy of the GNU General Public License
14
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
15

16
//! MARF tests related to [`TrieNodePatch`] node type.
17

18
use std::io::Cursor;
19

20
use super::*;
21
use crate::codec::{Error as codec_error, StacksMessageCodec};
22

23
#[test]
24
fn trie_node_patch_try_from_nodetype_returns_none_when_no_diffs() {
×
25
    let node = TrieNodeType::Node4(TrieNode4::new(&[1]));
×
26

27
    let old_node_ptr = TriePtr::default();
×
28
    let old_node = &node;
×
29
    let new_node = &node;
×
30
    let result = TrieNodePatch::try_from_nodetype(old_node_ptr, old_node, new_node);
×
31

32
    assert!(
×
33
        result.is_none(),
×
34
        "None because the computed patch has no diffs"
35
    );
36
}
×
37

38
#[test]
39
fn trie_node_patch_try_from_patch_returns_none_when_no_diffs() {
×
40
    let old_patch_ptr = TriePtr::new(TrieNodeID::Node4 as u8, 0, 0);
×
41
    let old_patch = TrieNodePatch {
×
42
        ptr: old_patch_ptr.clone(),
×
43
        ptr_diff: vec![],
×
44
    };
×
45
    let new_node = TrieNodeType::Node4(TrieNode4::new(&[1]));
×
46
    let result = TrieNodePatch::try_from_patch(old_patch_ptr, &old_patch, &new_node);
×
47

48
    assert!(
×
49
        result.is_none(),
×
50
        "None because the computed patch has no diffs"
51
    );
52
}
×
53

54
#[test]
55
fn trie_node_patch_serialize_ok() {
×
56
    let patch_node = TrieNodePatch {
×
57
        ptr: TriePtr::new(1, 10, 0),
×
58
        ptr_diff: vec![TriePtr::new(1, 20, 0).clone(); 1],
×
59
    };
×
60

61
    let mut buffer = Cursor::new(Vec::new());
×
62
    patch_node
×
63
        .consensus_serialize(&mut buffer)
×
64
        .expect("serialization should be ok");
×
65

66
    // To fit in 1 byte, diff count is serialized 0-based (where 0 => 1 and 255 => 256)
67
    let diff_count = 0u8;
×
68
    assert_eq!(
×
69
        vec![6, 65, 10, 0, 0, 0, 0, diff_count, 65, 20, 0, 0, 0, 0],
×
70
        buffer.into_inner(),
×
71
    );
72
}
×
73

74
#[test]
75
fn trie_node_patch_serialize_fails_with_ptr_diffs_len_0() {
×
76
    let patch_node = TrieNodePatch {
×
77
        ptr: TriePtr::default(),
×
78
        ptr_diff: vec![],
×
79
    };
×
80

81
    let mut buffer = Cursor::new(Vec::new());
×
82
    let error = patch_node
×
83
        .consensus_serialize(&mut buffer)
×
84
        .expect_err("serialization should fail");
×
85

86
    assert!(
×
87
        matches!(&error, codec_error::SerializeError(msg) if msg.contains("len 0")),
×
88
        "instead got: {error}"
89
    );
90
}
×
91

92
#[test]
93
fn trie_node_patch_serialize_ok_with_ptr_diffs_len_256() {
×
94
    let patch_node = TrieNodePatch {
×
95
        ptr: TriePtr::default(),
×
96
        ptr_diff: vec![TriePtr::default(); 256],
×
97
    };
×
98

99
    let mut buffer = Cursor::new(Vec::new());
×
100
    let result = patch_node.consensus_serialize(&mut buffer);
×
101
    assert!(
×
102
        result.is_ok(),
×
103
        "Got Error: {}",
104
        result.unwrap_err().to_string()
×
105
    );
106
}
×
107

108
#[test]
109
fn trie_node_patch_serialize_fails_with_ptr_diffs_len_257() {
×
110
    let patch_node = TrieNodePatch {
×
111
        ptr: TriePtr::default(),
×
112
        ptr_diff: vec![TriePtr::default(); 257],
×
113
    };
×
114

115
    let mut buffer = Cursor::new(Vec::new());
×
116
    let error = patch_node
×
117
        .consensus_serialize(&mut buffer)
×
118
        .expect_err("serialization should fail");
×
119

120
    assert!(
×
121
        matches!(&error, codec_error::SerializeError(msg) if msg.contains("len 257")),
×
122
        "instead got: {error}"
123
    );
124
}
×
125

126
#[test]
127
fn trie_node_patch_deserialize_ok_with_ptr_diffs_len_1() {
×
128
    // To fit in 1 byte, diff count is serialized 0-based (where 0 => 1 and 255 => 256)
129
    let diff_count = 0u8;
×
130
    let mut buffer = Cursor::new(vec![6, 65, 10, 0, 0, 0, 0, diff_count, 65, 20, 0, 0, 0, 0]);
×
131

132
    let patch_node =
×
133
        TrieNodePatch::consensus_deserialize(&mut buffer).expect("deserialization should be ok");
×
134

135
    let expected = TrieNodePatch {
×
136
        ptr: TriePtr::new(1, 10, 0),
×
137
        ptr_diff: vec![TriePtr::new(1, 20, 0); 1],
×
138
    };
×
139
    assert_eq!(expected, patch_node);
×
140
}
×
141

142
/// [`TrieNodePatch::make_ptr_diff`] in the following scenario:
143
///
144
/// ## Input
145
/// - `old_ptrs` is empty
146
/// - `new_ptrs` contains a single empty pointer
147
///
148
/// ## Expected behavior
149
/// - No differences are produced
150
#[test]
151
fn trie_node_patch_make_ptr_diff_case1() {
×
152
    let old_node_ptr = TriePtr::new_backptr(TrieNodeID::Patch as u8, 0x00, 0, 1);
×
153
    let old_ptrs = [];
×
154
    let new_ptrs = [TriePtr::new(TrieNodeID::Empty as u8, 0x00, 0)];
×
155

156
    let diff = TrieNodePatch::make_ptr_diff_for_test(&old_node_ptr, &old_ptrs, &new_ptrs);
×
157
    assert_eq!(0, diff.len());
×
158
}
×
159

160
/// [`TrieNodePatch::make_ptr_diff`] in the following scenario:
161
///
162
/// ## Input
163
/// - `old_ptrs` is empty
164
/// - `new_ptrs` contains:
165
///   - one normal (non-backpointer) node
166
///   - one backpointer node
167
///
168
/// ## Expected behavior
169
/// - Both pointers are reported as differences
170
#[test]
171
fn trie_node_patch_make_ptr_diff_case2() {
×
172
    let old_node_ptr = TriePtr::new_backptr(TrieNodeID::Patch as u8, 0x00, 0, 1);
×
173
    let old_ptrs = [];
×
174
    let new_ptrs = [
×
175
        TriePtr::new(TrieNodeID::Node4 as u8, 0x00, 0),
×
176
        TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x01, 0, 1),
×
177
    ];
×
178

179
    let diff = TrieNodePatch::make_ptr_diff_for_test(&old_node_ptr, &old_ptrs, &new_ptrs);
×
180
    assert_eq!(2, diff.len());
×
181
    assert_eq!(TriePtr::new(TrieNodeID::Node4 as u8, 0x00, 0), diff[0]);
×
182
    assert_eq!(
×
183
        TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x01, 0, 1),
×
184
        diff[1]
×
185
    );
186
}
×
187

188
/// [`TrieNodePatch::make_ptr_diff`] in the following scenario:
189
///
190
/// ## Input
191
/// - `old_ptr` is **not** a backpointer
192
/// - `new_ptr` **is** a backpointer
193
/// - `new_ptr.back_block` matches `old_node_ptr.back_block`
194
/// - After normalization, `new_ptr` equals `old_ptr`
195
///
196
/// ## Expected behavior
197
/// - No differences are produced
198
#[test]
199
fn trie_node_patch_make_ptr_diff_case3() {
×
200
    let old_node_ptr = TriePtr::new_backptr(TrieNodeID::Patch as u8, 0x00, 0, 1);
×
201
    let old_ptrs = [TriePtr::new(TrieNodeID::Node4 as u8, 0x00, 0)];
×
202
    let new_ptrs = [TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x00, 0, 1)];
×
203

204
    let diff = TrieNodePatch::make_ptr_diff_for_test(&old_node_ptr, &old_ptrs, &new_ptrs);
×
205
    assert_eq!(0, diff.len());
×
206
}
×
207

208
/// [`TrieNodePatch::make_ptr_diff`] in the following scenario:
209
///
210
/// ## Input
211
/// - `old_ptr` is **not** a backpointer
212
/// - `new_ptr` **is** a backpointer
213
/// - `new_ptr.back_block` matches `old_node_ptr.back_block`
214
/// - After normalization, `new_ptr` does **not** equal `old_ptr`
215
///
216
/// ## Expected behavior
217
/// - The new pointer is reported as a difference
218
#[test]
219
fn trie_node_patch_make_ptr_diff_case4() {
×
220
    let old_node_ptr = TriePtr::new_backptr(TrieNodeID::Patch as u8, 0x00, 0, 1);
×
221
    let old_ptrs = [TriePtr::new(TrieNodeID::Node4 as u8, 0x00, 0)];
×
222
    let new_ptrs = [TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x00, 100, 1)];
×
223

224
    let diff = TrieNodePatch::make_ptr_diff_for_test(&old_node_ptr, &old_ptrs, &new_ptrs);
×
225
    assert_eq!(1, diff.len());
×
226
    assert_eq!(
×
227
        TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x00, 100, 1),
×
228
        diff[0]
×
229
    );
230
}
×
231

232
/// [`TrieNodePatch::make_ptr_diff`] in the following scenario:
233
///
234
/// ## Input
235
/// - `old_ptr` is **not** a backpointer
236
/// - `new_ptr` **is** a backpointer
237
/// - `new_ptr.back_block` does **not** match `old_node_ptr.back_block`
238
/// - `new_ptr` does **not** equal `old_ptr`
239
///
240
/// ## Expected behavior
241
/// - The new pointer is reported as a difference
242
#[test]
243
fn trie_node_patch_make_ptr_diff_case5() {
×
244
    let old_node_ptr = TriePtr::new_backptr(TrieNodeID::Patch as u8, 0x00, 0, 1);
×
245
    let old_ptrs = [TriePtr::new(TrieNodeID::Node4 as u8, 0x00, 0)];
×
246
    let new_ptrs = [TriePtr::new_backptr(
×
247
        TrieNodeID::Node4 as u8,
×
248
        0x00,
×
249
        100,
×
250
        100,
×
251
    )];
×
252

253
    let diff = TrieNodePatch::make_ptr_diff_for_test(&old_node_ptr, &old_ptrs, &new_ptrs);
×
254
    assert_eq!(1, diff.len());
×
255
    assert_eq!(
×
256
        TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x00, 100, 100),
×
257
        diff[0]
×
258
    );
259
}
×
260

261
/// [`TrieNodePatch::make_ptr_diff`] in the following scenario:
262
///
263
/// ## Input
264
/// - `old_ptr` **is** a backpointer
265
/// - `new_ptr` **is** a backpointer
266
/// - `new_ptr` equals `old_ptr`
267
///
268
/// ## Expected behavior
269
/// - No differences are produced
270
#[test]
271
fn trie_node_patch_make_ptr_diff_case6() {
×
272
    let old_node_ptr = TriePtr::new_backptr(TrieNodeID::Patch as u8, 0x00, 0, 1);
×
273
    let old_ptrs = [TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x00, 0x00, 2)];
×
274
    let new_ptrs = [TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x00, 0x00, 2)];
×
275

276
    let diff = TrieNodePatch::make_ptr_diff_for_test(&old_node_ptr, &old_ptrs, &new_ptrs);
×
277
    assert_eq!(0, diff.len());
×
278
}
×
279

280
/// [`TrieNodePatch::make_ptr_diff`] in the following scenario:
281
///
282
/// ## Input
283
/// - `old_ptr` is **not** a backpointer
284
/// - `new_ptr` is **not** a backpointer
285
/// - `new_ptr` equals `old_ptr`
286
///
287
/// ## Expected behavior
288
/// - The pointer is reported as a difference
289
#[test]
290
fn trie_node_patch_make_ptr_diff_case7() {
×
291
    let old_node_ptr = TriePtr::new_backptr(TrieNodeID::Patch as u8, 0x00, 0, 1);
×
292
    let old_ptrs = [TriePtr::new(TrieNodeID::Node4 as u8, 0x00, 0x00)];
×
293
    let new_ptrs = [TriePtr::new(TrieNodeID::Node4 as u8, 0x00, 0x00)];
×
294

295
    let diff = TrieNodePatch::make_ptr_diff_for_test(&old_node_ptr, &old_ptrs, &new_ptrs);
×
296
    assert_eq!(1, diff.len());
×
297
    assert_eq!(TriePtr::new(TrieNodeID::Node4 as u8, 0x00, 0x00), diff[0]);
×
298
}
×
299

300
/// [`TrieNodePatch::make_ptr_diff`] in the following scenario:
301
///
302
/// ## Input
303
/// - `old_ptrs` contains a non-empty pointer
304
/// - `new_ptrs` contains a single empty pointer
305
///
306
/// ## Expected behavior
307
/// - No differences are produced
308
///
309
/// ## Note
310
/// In real scenarios, a Trie node with only empty pointers won't exist,
311
/// as nodes are created only when at least one child is present.
312
/// This test exists purely to exercise `make_ptr_diff` with such an input,
313
/// ensuring all code paths are covered and behavior is well-defined.
314
#[test]
315
fn trie_node_patch_make_ptr_diff_case8() {
×
316
    let old_node_ptr = TriePtr::new_backptr(TrieNodeID::Patch as u8, 0x00, 0, 1);
×
317
    let old_ptrs = [TriePtr::new(TrieNodeID::Node4 as u8, 0x00, 0)];
×
318
    let new_ptrs = [TriePtr::new(TrieNodeID::Empty as u8, 0x00, 0)];
×
319

320
    let diff = TrieNodePatch::make_ptr_diff_for_test(&old_node_ptr, &old_ptrs, &new_ptrs);
×
321
    assert_eq!(0, diff.len());
×
322
}
×
323

324
/// [`TrieNodePatch::make_ptr_diff`] in the following scenario:
325
///
326
/// ## Input
327
/// - `old_ptr` **is** a backpointer
328
/// - `new_ptr` is **not** a backpointer
329
/// - Both pointers refer to the same logical node
330
///
331
/// ## Expected behavior
332
/// - The new pointer is reported as a difference
333
#[test]
334
fn trie_node_patch_make_ptr_diff_case9() {
×
335
    let old_node_ptr = TriePtr::new_backptr(TrieNodeID::Patch as u8, 0x00, 0, 1);
×
336
    let old_ptrs = [TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x00, 42, 2)];
×
337
    let new_ptrs = [TriePtr::new(TrieNodeID::Node4 as u8, 0x00, 42)];
×
338

339
    let diff = TrieNodePatch::make_ptr_diff_for_test(&old_node_ptr, &old_ptrs, &new_ptrs);
×
340
    assert_eq!(1, diff.len());
×
341
    assert_eq!(TriePtr::new(TrieNodeID::Node4 as u8, 0x00, 42), diff[0]);
×
342
}
×
343

344
/// [`TrieNodePatch::make_ptr_diff`] in the following scenario:
345
///
346
/// ## Input
347
/// - `old_ptr` **is** a backpointer
348
/// - `new_ptr` is **not** a backpointer
349
/// - `new_ptr` does **not** equal `old_ptr`
350
///
351
/// ## Expected behavior
352
/// - The new pointer is reported as a difference
353
#[test]
354
fn trie_node_patch_make_ptr_diff_case10() {
×
355
    let old_node_ptr = TriePtr::new_backptr(TrieNodeID::Patch as u8, 0x00, 0, 1);
×
356
    let old_ptrs = [TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x00, 10, 2)];
×
357
    let new_ptrs = [TriePtr::new(TrieNodeID::Node4 as u8, 0x00, 99)];
×
358

359
    let diff = TrieNodePatch::make_ptr_diff_for_test(&old_node_ptr, &old_ptrs, &new_ptrs);
×
360
    assert_eq!(1, diff.len());
×
361
    assert_eq!(TriePtr::new(TrieNodeID::Node4 as u8, 0x00, 99), diff[0]);
×
362
}
×
363

364
/// [`TrieNodePatch::make_ptr_diff`] in the following scenario:
365
///
366
/// ## Input
367
/// - `old_ptr` **is** a backpointer
368
/// - `new_ptr` **is** a backpointer
369
/// - `new_ptr.back_block` matches `old_node_ptr.back_block`
370
/// - `new_ptr` does **not** equal `old_ptr`
371
///
372
/// ## Expected behavior
373
/// - The new pointer is reported as a difference
374
#[test]
375
fn trie_node_patch_make_ptr_diff_case11() {
×
376
    let old_node_ptr = TriePtr::new_backptr(TrieNodeID::Patch as u8, 0x00, 0, 1);
×
377
    let old_ptrs = [TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x00, 10, 1)];
×
378
    let new_ptrs = [TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x00, 20, 1)];
×
379

380
    let diff = TrieNodePatch::make_ptr_diff_for_test(&old_node_ptr, &old_ptrs, &new_ptrs);
×
381
    assert_eq!(1, diff.len());
×
382
    assert_eq!(
×
383
        TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x00, 20, 1),
×
384
        diff[0]
×
385
    );
386
}
×
387

388
/// [`TrieNodePatch::make_ptr_diff`] in the following scenario:
389
///
390
/// ## Input
391
/// - `old_ptrs` contains multiple pointers with the same `chr`
392
/// - The last pointer with that `chr` overwrites the previous one
393
/// - `new_ptr` matches the last `old_ptr`
394
///
395
/// ## Expected behavior
396
/// - No differences are produced
397
///
398
/// ## Note
399
/// In real scenarios, a Trie node has at most one pointer per `chr` value.
400
/// This test exists purely to exercise `make_ptr_diff` with such an input,
401
/// ensuring all code paths are covered and behavior is well-defined.
402
#[test]
403
fn trie_node_patch_make_ptr_diff_case12() {
×
404
    let old_node_ptr = TriePtr::new_backptr(TrieNodeID::Patch as u8, 0x00, 0, 1);
×
405
    let old_ptrs = [
×
406
        TriePtr::new(TrieNodeID::Node4 as u8, 0x01, 10),
×
407
        TriePtr::new(TrieNodeID::Node4 as u8, 0x01, 20),
×
408
    ];
×
409
    let new_ptrs = [TriePtr::new(TrieNodeID::Node4 as u8, 0x01, 20)];
×
410

411
    let diff = TrieNodePatch::make_ptr_diff_for_test(&old_node_ptr, &old_ptrs, &new_ptrs);
×
412
    assert_eq!(1, diff.len());
×
413
    assert_eq!(TriePtr::new(TrieNodeID::Node4 as u8, 0x01, 20), diff[0]);
×
414
}
×
415

416
/// Aggregated test of [`TrieNodePatch::make_ptr_diff`] combining all singular scenarios.
417
///
418
/// ## Input
419
/// - `old_ptrs` contains a mix of:
420
///   - non-backpointers
421
///   - backpointers
422
///   - duplicate `chr` entries (last one wins)
423
/// - `new_ptrs` contains a mix of:
424
///   - empty pointers
425
///   - normalized backpointers
426
///   - mismatching backpointers
427
///   - matching and non-matching non-backpointers
428
///
429
/// ## Expected behavior
430
/// - Only pointers that semantically differ from their corresponding old pointers
431
///   are included in the diff
432
#[test]
433
fn trie_node_patch_make_ptr_diff_all_in_one() {
×
434
    let old_node_ptr = TriePtr::new_backptr(TrieNodeID::Patch as u8, 0x00, 0, 1);
×
435

436
    let old_ptrs = [
×
437
        // Case 3 / 4 / 5
×
438
        TriePtr::new(TrieNodeID::Node4 as u8, 0x00, 0),
×
439
        // Case 6 / 9 / 10
×
440
        TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x01, 10, 2),
×
441
        // Case 7
×
442
        TriePtr::new(TrieNodeID::Node4 as u8, 0x02, 20),
×
443
        // Case 12: duplicate chr, first (overwritten)
×
444
        TriePtr::new(TrieNodeID::Node4 as u8, 0x03, 30),
×
445
        // Case 12: duplicate chr, second (effective)
×
446
        TriePtr::new(TrieNodeID::Node4 as u8, 0x03, 40),
×
447
    ];
×
448

449
    let new_ptrs = [
×
450
        // Case 1 / 8: empty pointer (ignored)
×
451
        TriePtr::new(TrieNodeID::Empty as u8, 0xFF, 0),
×
452
        // Case 3: normalized backptr equals old_ptr (no diff)
×
453
        TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x00, 0, 1),
×
454
        // Case 4: normalized backptr != old_ptr (diff)
×
455
        TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x00, 100, 1),
×
456
        // Case 9: old backptr, new non-backptr, same target (diff)
×
457
        TriePtr::new(TrieNodeID::Node4 as u8, 0x01, 10),
×
458
        // Case 10: old backptr, new non-backptr, different target (diff)
×
459
        TriePtr::new(TrieNodeID::Node4 as u8, 0x01, 99),
×
460
        // Case 7: both non-backptr equal (diff)
×
461
        TriePtr::new(TrieNodeID::Node4 as u8, 0x02, 20),
×
462
        // Case 11: both backptr, unequal, same back_block (diff)
×
463
        TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x02, 200, 1),
×
464
        // Case 12: duplicate chr, matches last old_ptr (diff)
×
465
        TriePtr::new(TrieNodeID::Node4 as u8, 0x03, 40),
×
466
        // Case 2: new_ptr with no corresponding old_ptr (diff)
×
467
        TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x04, 0, 1),
×
468
    ];
×
469

470
    let diff = TrieNodePatch::make_ptr_diff_for_test(&old_node_ptr, &old_ptrs, &new_ptrs);
×
471

472
    let expected = vec![
×
473
        // Case 4
474
        TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x00, 100, 1),
×
475
        // Case 9
476
        TriePtr::new(TrieNodeID::Node4 as u8, 0x01, 10),
×
477
        // Case 10
478
        TriePtr::new(TrieNodeID::Node4 as u8, 0x01, 99),
×
479
        // Case 7
480
        TriePtr::new(TrieNodeID::Node4 as u8, 0x02, 20),
×
481
        // Case 11
482
        TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x02, 200, 1),
×
483
        // Case 12
484
        TriePtr::new(TrieNodeID::Node4 as u8, 0x03, 40),
×
485
        // Case 2
486
        TriePtr::new_backptr(TrieNodeID::Node4 as u8, 0x04, 0, 1),
×
487
    ];
488

489
    assert_eq!(diff, expected);
×
490
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc