Integration Tests: - Add tile_decode_integration.rs with 17 test cases - Test simple and complex geometry decoding - Test security limit enforcement - Test error handling for malformed input - Test various OSM feature types - Test different zoom levels - Test Unicode tag handling Benchmarks: - Add tile_decode_bench.rs with 6 benchmark suites - Benchmark simple JSON decoding - Benchmark scaling with feature count (10-1000 features) - Benchmark MVT parsing performance - Benchmark geometry tessellation - Benchmark POI extraction (100 POIs) - Benchmark label extraction (50 labels) Fuzz Testing: - Add fuzz testing infrastructure with cargo-fuzz - Create 3 fuzz targets: MVT parser, Overpass parser, full pipeline - Test parsers with random input to find crashes and edge cases Test Runner: - Add tools/run_map_tests.sh for easy test execution - Support for unit, integration, bench, fuzz, and coverage tests - CI-friendly test execution Documentation: - Add PHASE6_TESTING_VALIDATION.md with comprehensive guide - Document test categories, running tests, and best practices - Include CI workflow examples and future improvements This completes Phase 6 of the code quality improvements.
30 lines
501 B
TOML
30 lines
501 B
TOML
[package]
|
|
name = "nigig-map-fuzz"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
publish = false
|
|
|
|
[package.metadata]
|
|
cargo-fuzz = true
|
|
|
|
[dependencies]
|
|
libfuzzer-sys = "0.4"
|
|
nigig-map = { path = ".." }
|
|
|
|
[[bin]]
|
|
name = "fuzz_mvt_parser"
|
|
path = "fuzz_targets/fuzz_mvt_parser.rs"
|
|
test = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_overpass_parser"
|
|
path = "fuzz_targets/fuzz_overpass_parser.rs"
|
|
test = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_tile_decode"
|
|
path = "fuzz_targets/fuzz_tile_decode.rs"
|
|
test = false
|
|
doc = false
|