Skip to main content
FORGEJO ERA / ISSUE #615

The options analyzer has no automated tests

closedOpened by MelanX on

Original description​

By MelanX · October 23, 2026

Crate: tools/minecraft-options

Commit: 2b2af1e4f8166d02e4732d19e040a53745d97a51

Behavior

No test file imports analyze_options.py. Its parsing helpers, default resolution, normalization, compatibility matrix, report, and main (3000+ lines) have no regression protection, and every defect in the linked analyzer issues would have been caught by a small fixture of disassembly text (the ternary initializer, empty string, negative exponent, switch table, logarithm bounds, and legacy tri-state cases among them). Test layout would be small javap-text fixtures with a documented provenance in fixtures/options/SOURCES.md, run offline.

Expected behavior

Unit tests cover the instruction parser, arithmetic and formula helpers, default and range resolution, legacy load and save analysis, enum extraction, keybinding decoding, normalize, and compatibility, using minimal deterministic fixtures. Ordinary runs need no javap or network.

Impact

Analyzer changes are validated only by regenerating data and reading diffs.

Locations

  • tools/minecraft-options/analyze_options.py
  • tools/minecraft-options/test_*.py

Validation and limitations

Confirmed with a search for analyze_options in the test files.

THE CONVERSATION

Discussion history​

1 comment

MelanX

Closing as no longer valid. The analyzer is covered by offline tests in tools/minecraft-options/tests (javap tokenizer, option and OptionInstance analysis, default and range resolution, enum extraction, key binding decoding and key code spaces, numeric constants, extraction completeness, the graphics preset controls and the analyzer command line), and the compatibility matrix and report this issue lists were removed with the other research outputs nothing consumed.