Skip to content

Test cases - implementation needed #4

@MarkosComK

Description

@MarkosComK

Description

Current test suite lacks coverage for several important scenarios and edge cases across multiple functions.

Areas Needing Coverage

Character Functions

  • Test non-ASCII characters in character manipulation functions
  • Add overflow testing for toLower/toUpper edge cases
  • Test character functions with extended ASCII values (128-255)

String Operations

  • Add tests for strings containing null bytes
  • Test concat with buffer overflow scenarios
  • Test compare with strings of different lengths
  • Add boundary testing for contains with overlapping patterns
  • Test findR with repeated characters

Math Operations

  • Add overflow testing for pow function
  • Test sqrt with maximum uint64 values
  • Add negative number handling tests for abs
  • Test fibonacci with boundary conditions
  • Test factorial with edge cases

Cast Functions

  • Add tests for atoi with:
    • Multiple leading zeros
    • Maximum/minimum integer values
    • Invalid number formats
    • Mixed valid/invalid characters

Implementation Notes

  • Each test case should follow existing test style in char_test.zig
  • Use printTestResult helper for consistent output formatting
  • Follow Zig testing best practices

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions