towerops/test/snmpkit/snmp_lib
mayor 42895fea8f
test: add comprehensive tests for MIB.Error
Added complete test coverage for MIB.Error module (16.13% -> target 100%):

**Error Creation:**
- All supported error types (syntax, semantic, import, type, constraint, etc.)
- Error creation with line and column information
- Error creation with context maps
- Suggestion generation for common mistakes

**Error Types Tested:**
- unexpected_token with various combinations (expected/actual/value)
- unexpected_eof with expected values
- unterminated_string
- invalid_number and invalid_identifier
- file_not_found with path
- import_error with symbol and module
- duplicate_definition with name
- Generic error types

**Suggestion Generation:**
- MAX-ACCESS vs ACCESS typo
- deprecated 'mandatory' vs 'current'
- OBJECT-TYPE vs OBJECT-IDENTITY confusion
- Unterminated string hints
- File not found with RFC/MIB name detection
- Import error dependency hints

**Error Formatting:**
- Format with/without line and column
- Format with/without suggestions
- Multiple suggestion formatting
- Edge cases (nil values, empty strings, non-standard types)

**Edge Cases:**
- All nil fields
- Large line numbers
- Zero/negative line/column values
- Various context data types
- Mixed token value types
- Empty options handling

53 new tests added
Test count: 1,211 -> 1,264 (all passing)
2026-02-06 08:38:33 -06:00
..
mib test: add comprehensive tests for MIB.Error 2026-02-06 08:38:33 -06:00
pdu test: add comprehensive tests for PDU.Constants and MIB.Logger 2026-02-06 08:36:20 -06:00
asn1_test.exs snmp tests and docker attempt to build locally 2026-01-27 10:16:54 -06:00
cache_test.exs bring in snmpkit 2026-01-23 12:52:17 -06:00
config_test.exs bring in snmpkit 2026-01-23 12:52:17 -06:00
dashboard_test.exs bring in snmpkit 2026-01-23 12:52:17 -06:00
decoder_long_length_test.exs snmpkit overhaul and etcd 2026-01-23 16:23:57 -06:00
error_handler_test.exs Add comprehensive test coverage for SNMPkit modules 2026-02-05 17:03:41 -06:00
error_test.exs bring in snmpkit 2026-01-23 12:52:17 -06:00
host_parser_test.exs Fix SNMPkit tests and add coverage for bang methods 2026-02-05 16:46:36 -06:00
manager_test.exs more tests and fixes 2026-01-31 16:00:07 -06:00
monitor_test.exs Add comprehensive test coverage for SNMPkit modules 2026-02-05 17:03:41 -06:00
oid_test.exs more tests and fixes 2026-01-31 16:00:07 -06:00
pdu_test.exs more tests and fixes 2026-01-31 16:00:07 -06:00
pool_test.exs bring in snmpkit 2026-01-23 12:52:17 -06:00
security_test.exs bring in snmpkit 2026-01-23 12:52:17 -06:00
snmpv3_edge_cases_test.exs credo improvements 2026-01-23 13:40:49 -06:00
snmpv3_integration_test.exs improve credo 2026-01-23 18:21:40 -06:00
transport_test.exs more tests and fixes 2026-01-31 16:00:07 -06:00
types_test.exs test: expand Types module test coverage 2026-02-05 17:24:10 -06:00
utils_test.exs bring in snmpkit 2026-01-23 12:52:17 -06:00
walker_test.exs bring in snmpkit 2026-01-23 12:52:17 -06:00