Sprint 2 Step 6: JSON deserialization and round-trip verification

fromJson(json) reconstructs heap-allocated AST from JSON. createNode factory
handles all 33 concepts. deleteTree for cleanup. Test verifies save→load→save
produces byte-identical JSON for the full Calculator model.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bill
2026-02-06 19:14:45 -07:00
parent 5579a4747f
commit 665c96b648
3 changed files with 293 additions and 0 deletions

View File

@@ -29,3 +29,7 @@ target_include_directories(step4_test PRIVATE src)
add_executable(step5_test tests/step5_test.cpp)
target_include_directories(step5_test PRIVATE src)
target_link_libraries(step5_test PRIVATE nlohmann_json::nlohmann_json)
add_executable(step6_test tests/step6_test.cpp)
target_include_directories(step6_test PRIVATE src)
target_link_libraries(step6_test PRIVATE nlohmann_json::nlohmann_json)