qubit-json 0.9.0

Resource-aware infrastructure for lenient and strict JSON processing
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// =============================================================================
//    Copyright (c) 2026 Haixing Hu.
//
//    SPDX-License-Identifier: Apache-2.0
//
//    Licensed under the Apache License, Version 2.0.
// =============================================================================
use qubit_budget::json::JsonResource;
use qubit_json::value::traverse::JsonTreeProcessError;

/// Verifies that visitor failures retain their domain payload.
#[test]
fn test_visitor_error_variant_retains_payload() {
    let error = JsonTreeProcessError::<JsonResource, usize, _>::Visitor("failed");

    assert!(matches!(error, JsonTreeProcessError::Visitor("failed")));
}