Skip to content

Added comprehensive null-safety tests for dictionary and property acc…#19

Merged
temonk merged 4 commits intomainfrom
bugfix/dictionaryNull
Apr 8, 2026
Merged

Added comprehensive null-safety tests for dictionary and property acc…#19
temonk merged 4 commits intomainfrom
bugfix/dictionaryNull

Conversation

@temonk
Copy link
Copy Markdown
Contributor

@temonk temonk commented Apr 8, 2026

…ess.

Updated SimpraParserVisitor for null-safe dictionary indexing and revised test data for substring edge cases. Updated NuGet package versions.

Temo Nikolaishvili added 2 commits April 8, 2026 18:04
…ess.

Updated SimpraParserVisitor for null-safe dictionary indexing and revised test data for substring edge cases. Updated NuGet package versions.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves Simpra DSL null-safety around dictionary indexing (preventing null dictionary access from throwing) and adds/updates tests to validate the behavior, alongside routine package/version bumps.

Changes:

  • Updated SimpraParserVisitor to null-check dictionaries before calling TryGetValue during index access.
  • Added a large suite of null-safety tests for dictionary/list/property access chains.
  • Updated test data for substring edge cases and bumped NuGet/package versions.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/AltaSoft.Simpra.tests/SimpraExpressionTests.cs Updates substring edge-case tests; adds an extra test (currently misplaced/typoed)
tests/AltaSoft.Simpra.tests/NullSafetyTests.cs Adds comprehensive null-safety coverage for dictionary/list/property access patterns
tests/AltaSoft.Simpra.tests/Models/DebtorAccount.cs Introduces a model used by the new null-safety tests
src/AltaSoft.Simpra/Visitor/SimpraParserVisitor.cs Implements null-safe dictionary index access in the visitor
Directory.Packages.props Updates dependency versions
Directory.Build.props Bumps project version

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@altasoft altasoft deleted a comment from Copilot AI Apr 8, 2026
temonk and others added 2 commits April 8, 2026 18:15
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@temonk temonk merged commit bda40f8 into main Apr 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants