Skip to content

Add unit tests for InterMission and Help modules (94 new tests)#912

Merged
7474 merged 1 commit intomasterfrom
copilot/increase-test-coverage
Apr 3, 2026
Merged

Add unit tests for InterMission and Help modules (94 new tests)#912
7474 merged 1 commit intomasterfrom
copilot/increase-test-coverage

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 3, 2026

Command-level tests are complete (188 commands covered, 7205 tests passing). This PR moves to the next coverage phase: previously-untested core modules.

InterMission (25 tests)

  • RankUpCost: All three upgrade cost modes (standard 10-step, low-cost, 15-step) with full rank sweep, separation/main-form restrictions, time limits, cost modifier feature, and disable guard
  • MaxRank: Default/5-step/15-step options, Disable(unit,改造) global variable guard, 最大改造数 feature cap
// Example: verifies all 10 standard-mode rank costs in one pass
var expected = new[] { 10000, 15000, 20000, 40000, 80000, 150000, 200000, 300000, 400000, 500000 };
for (int rank = 0; rank < expected.Length; rank++)
{
    var src = CreateSrc();
    var unit = CreateUnit(src, "全ランク機" + rank, rank);
    var im = new InterMission(src);
    Assert.AreEqual(expected[rank], im.RankUpCost(unit));
}

Help.AttributeName (69 tests)

  • Full branch coverage of the weapon-attribute-code → display-name mapping (~60 attribute codes)
  • is_ability parameter branching for and attributes

Results

  • 7205 → 7299 tests, 0 failures, no regressions
  • Status.cs (5,355 lines) confirmed entirely commented-out (unported VB6) — not testable yet

Copilot AI assigned Copilot and 7474 Apr 3, 2026
Copilot AI had a problem deploying to SRC#DataViewer dev April 3, 2026 19:55 Failure
@7474 7474 marked this pull request as ready for review April 3, 2026 19:56
@7474 7474 merged commit de031bd into master Apr 3, 2026
5 of 6 checks passed
@7474 7474 deleted the copilot/increase-test-coverage branch April 3, 2026 19:57
@7474 7474 temporarily deployed to SRC#DataViewer dev April 3, 2026 19:57 — with GitHub Actions Inactive
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.

2 participants