Skip to content

Add out-of-range value validation tests for Modbus registers#10

Merged
pledou merged 2 commits intomainfrom
feature/out-of-range-validation
Jan 16, 2026
Merged

Add out-of-range value validation tests for Modbus registers#10
pledou merged 2 commits intomainfrom
feature/out-of-range-validation

Conversation

@pledou
Copy link
Owner

@pledou pledou commented Jan 16, 2026

Fixes #9

- Create OutOfRangeError exception class with detailed error info
- Add range validation for Int8/UInt8/Int16/UInt16/Int32/UInt32 register types
- Validate values before Buffer write operations in writeToRegister()
- Fix E2E test: replace 54321 (out-of-range) with 12345 (valid for Int16BE)
- All 53 tests pass: 37 unit + 16 E2E
- Out-of-range writes now throw descriptive errors instead of silent failures
@pledou pledou marked this pull request as ready for review January 16, 2026 13:29
@pledou pledou merged commit 5290ae1 into main Jan 16, 2026
3 checks passed
@pledou pledou deleted the feature/out-of-range-validation branch January 16, 2026 13:29
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.

Implement value range validation for Modbus register writes - OutOfRange errors

1 participant