Skip to content

Latest commit

 

History

History
158 lines (133 loc) · 6.94 KB

File metadata and controls

158 lines (133 loc) · 6.94 KB

Constexpr Test Implementation Checklist

Quick reference for tracking test implementation progress.

Floating-Point Note

The in-house floating-point parser is constexpr-compatible. Do not use JSONFUSION_FP_BACKEND=1 in constexpr tests.

io/ (1 file) ✅ COMPLETE

  • test_io_iterators.cpp - Byte-by-byte streaming with custom iterators

concepts/ (8 files) ✅ COMPLETE

  • test_json_parsable_value.cpp
  • test_json_serializable_value.cpp
  • test_consuming_streamer_like.cpp
  • test_producing_streamer_like.cpp
  • test_map_stdlib_interface.cpp
  • test_structural_detection.cpp
  • test_annotations_propagation.cpp
  • test_transformer_concepts.cpp

primitives/ (11 files) ✅ COMPLETE

  • test_parse_int.cpp
  • test_parse_bool.cpp
  • test_parse_bool_edge_cases.cpp
  • test_parse_char_array.cpp
  • test_parse_float.cpp
  • test_parse_integers_signed.cpp
  • test_parse_integers_unsigned.cpp
  • test_parse_integers_overflow.cpp
  • test_parse_integers_edge_cases.cpp
  • test_parse_strings_escaping.cpp
  • test_parse_strings_edge_cases.cpp

composite/ (15 files) ✅ COMPLETE

  • test_parse_nested_flat.cpp
  • test_parse_nested_complex.cpp
  • test_parse_array_primitives.cpp
  • test_parse_array_nested.cpp
  • test_parse_array_edge_cases.cpp
  • test_parse_optional_primitives.cpp
  • test_parse_optional_nested.cpp
  • test_parse_optional_edge_cases.cpp
  • test_parse_unique_ptr_primitives.cpp
  • test_parse_unique_ptr_nested.cpp
  • test_parse_string.cpp
  • test_parse_vector_primitives.cpp
  • test_parse_vector_nested.cpp
  • test_cpp_zero_sized.cpp
  • test_cpp_default_values.cpp

json_spec/ (7 files) ✅ COMPLETE

  • test_json_whitespace.cpp - Whitespace handling (RFC 8259)
  • test_json_field_order.cpp - Field ordering independence
  • test_json_null.cpp - Null handling (std::optional, std::unique_ptr)
  • test_json_syntax_valid.cpp - Valid JSON syntax (empty keys, deep nesting, large arrays)
  • test_json_syntax_invalid.cpp - Invalid JSON syntax error detection
  • test_json_strings_unicode.cpp - Unicode escapes, surrogate pairs, RFC 8259 compliance
  • test_json_numbers_format.cpp - RFC 8259 number format compliance

validation/ (15 files) ✅ COMPLETE

  • test_map_validators.cpp - All map validators (45 tests)
    • min_properties, max_properties
    • min_key_length, max_key_length
    • required_keys, allowed_keys, forbidden_keys
  • test_string_enum.cpp - String enum validation (17 tests)
    • enum_values<...> with incremental validation
  • test_validation_constant.cpp - constant<> (bool, integer, float, double)
  • test_validation_range_int.cpp - range<> for integers
  • test_validation_range_float.cpp - range<> for float and double
  • test_validation_range_signed.cpp - range<> for all signed int types
  • test_validation_range_unsigned.cpp - range<> for all unsigned int types
  • test_validation_string_length.cpp - min_length<>, max_length<>
  • test_validation_array_items.cpp - min_items<>, max_items<>
  • test_validation_struct_fields_presence.cpp - not_required<>/required<> (object-level)
  • test_validation_allow_excess_fields.cpp - allow_excess_fields (struct-level)
  • test_validation_combined_string.cpp - Multiple string validators
  • test_validation_combined_array.cpp - Multiple array validators
  • test_validation_combined_map.cpp - Multiple map validators
  • test_fn_validator.cpp - Custom function validators (fn_validator<Event, Lambda>)

serialization/ (9 files) ✅ COMPLETE

  • test_serialize_int.cpp
  • test_serialize_bool.cpp
  • test_serialize_float.cpp
  • test_serialize_integers_all_types.cpp
  • test_serialize_strings.cpp
  • test_float_decimals.cpp
  • test_pretty_print.cpp - Pretty-printed JSON output (JsonIteratorWriter<..., Pretty=true>)
  • test_size_estimation.cpp - Compile-time size estimation (EstimateMaxSerializedSize)
  • test_skip_nulls.cpp - Skip null optional fields during serialization (skip_nulls)

roundtrip/ (3 files) ✅ COMPLETE

  • test_roundtrip_primitives.cpp
  • test_roundtrip_nested.cpp
  • test_roundtrip_annotated.cpp

streaming/ (6 files) ✅ COMPLETE

  • test_map_streaming.cpp - Map consumer/producer streamers
  • test_streamer_consumer_primitives.cpp - Array consumers for primitives
  • test_streamer_map_consumer.cpp - Map consumers with std::array<char,N> and std::string keys
  • test_streamer_producer_primitives.cpp - Array producers for primitives
  • test_streamer_map_producer.cpp - Map producers with std::array<char,N> and std::string keys
  • test_string_streaming.cpp - String streaming

errors/ (7 files) ✅ COMPLETE

  • test_error_demo.cpp
  • test_error_json_path_primitives.cpp
  • test_error_json_path_arrays.cpp
  • test_error_json_path_maps.cpp
  • test_error_json_path_mixed.cpp
  • test_error_json_path_depth_calculation.cpp
  • test_error_path_annotations.cpp

limits/ (4 files) ✅ COMPLETE

  • test_limits_nesting_depth.cpp - Deep nesting (10 levels, arrays, optionals, mixed)
  • test_limits_large_arrays.cpp - Large arrays (100 ints, 50 bools, 20 strings, 10x10 matrix, 50 in struct)
  • test_limits_many_fields.cpp - Many fields (50 fields, 30 mixed, nested, array fields)
  • test_limits_many_map_keys.cpp - Many map keys (30 allowed, 20 required, 30 forbidden, combined, binary search threshold)

fp/ (5 files) ✅ COMPLETE

  • test_fp_boundary_values.cpp - Powers of 2, powers of 10, scientific notation
  • test_fp_difficult_cases.cpp - David Gay suite samples, rounding boundaries
  • test_fp_subnormals.cpp - Subnormal numbers, gradual underflow
  • test_fp_exponent_extremes.cpp - DBL_MAX/DBL_MIN edge cases
  • test_fp_serialization_roundtrip.cpp - FP serialization roundtrips

wire_sink/ (4 files) ✅ COMPLETE

  • test_wire_sink_basic.cpp - Basic write/read, size tracking
  • test_wire_sink_concept_check.cpp - Concept verification
  • test_wire_sink_json_integration.cpp - JSON parser integration
  • test_wire_sink_static_schema.cpp - Static schema definition

cbor/ (4 files) ✅ COMPLETE

  • test_cbor_primitives.cpp - CBOR serialization/deserialization
  • test_cbor_wiresink_roundtrip.cpp - CBOR with WireSink
  • test_cbor_int_key.cpp - Integer keys with int_key<N> annotation (CBOR-native)
  • test_cbor_indexes_as_keys.cpp - Automatic index keys with indexes_as_keys (CBOR-native)

options/ (1 file) ✅ COMPLETE

  • test_annotated_skip_json.cpp - Fast-skip annotation

transformers/ (2 files) ✅ COMPLETE

  • test_lambda_transformer.cpp - Custom transformation lambdas
  • test_variant_oneof.cpp - VariantOneOf transformer for std::variant

json_schema/ (1 file) ✅ COMPLETE

  • test_json_schema_combined.cpp - Combined schema validators

interaction/ (1 file) ✅ COMPLETE

  • test_c_interop.cpp - C language interoperability

Total: 104 test files across 17 categories

All categories complete.