// Copyright (c) 2026 Kirky.X
//
// Licensed under the MIT License
// See LICENSE file in the project root for full license information.

//! TracingContext 单元测试

#[cfg(test)]
mod tests {
    use dbnexus::tracing::context::TracingContext;

    #[test]
    fn test_create_span() {
        let context = TracingContext::new("test_span");
        assert_eq!(context.span_name(), "test_span");
    }

    #[test]
    fn test_drop_ends_span() {
        {
            let _context = TracingContext::new("test_span");
            // span 在这里结束
        }
        // 验证 span 已结束（通过检查内部状态）
    }
}
