Skip to content

Add Unit Tests for Argument Parser — Edge Cases #283

@Timi16

Description

@Timi16

Description

The argument parser currently has limited test coverage for edge cases. Add comprehensive unit tests covering boundary values, invalid inputs, and type coercion edge cases.

Requirements

  • Test max and min values for all integer types (u32, i32, u64, i64)
  • Test empty string and whitespace-only string inputs
  • Test deeply nested Vec and Map structures
  • Test invalid JSON (malformed, trailing commas, wrong brackets)
  • Test null values in non-optional positions
  • Target: 90%+ coverage of parse_args()

Suggested Execution

  1. Branch: git checkout -b test/arg-parser-edge-cases
  2. Open src/runtime/executor.rs (or parser.rs after refactor)
  3. Add test module at bottom of file with #[cfg(test)]
  4. Write tests for every edge case listed
  5. Run cargo test and verify all pass
  6. Commit: test: add edge case unit tests for argument parser

Acceptance Criteria

  • Tests for all integer boundary values
  • Tests for invalid JSON inputs
  • Tests for deeply nested structures
  • Tests for null in non-optional positions
  • All tests pass
  • Coverage of parse_args() reaches 90%+

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions