qubit-json 0.8.0

Resource-aware infrastructure for lenient and strict JSON processing
Documentation
// =============================================================================
//    Copyright (c) 2026 Haixing Hu.
//
//    SPDX-License-Identifier: Apache-2.0
//
//    Licensed under the Apache License, Version 2.0.
// =============================================================================
//! Tests structured JSON syntax error reasons.

use qubit_json::decode::JsonSyntaxErrorReason;

#[test]
fn test_syntax_reasons_have_stable_display_text() {
    assert_eq!(JsonSyntaxErrorReason::ExpectedColon.to_string(), "expected ':'");
    assert_eq!(JsonSyntaxErrorReason::UnexpectedByte.to_string(), "unexpected byte");
    assert_eq!(
        JsonSyntaxErrorReason::IntegerOutOfRange.to_string(),
        "JSON integer is outside the supported 64-bit range",
    );
    assert_eq!(
        JsonSyntaxErrorReason::FloatOutOfRange.to_string(),
        "JSON number is outside the finite f64 range",
    );
}