Skip to content

Fix autograding test failures: Add JUnit Platform launcher for Gradle 9.2.1 and correct mask values#1

Merged
pravinpaudel merged 3 commits intomainfrom
copilot/debug-autograding-tests-issue
Dec 4, 2025
Merged

Fix autograding test failures: Add JUnit Platform launcher for Gradle 9.2.1 and correct mask values#1
pravinpaudel merged 3 commits intomainfrom
copilot/debug-autograding-tests-issue

Conversation

Copy link
Contributor

Copilot AI commented Dec 4, 2025

CI autograding tests failed with Gradle 9.2.1 while passing locally with Gradle 8.10 due to missing JUnit Platform launcher dependency and incorrect mask values in button click logic.

Changes

build.gradle

  • Added junit-platform-launcher:1.8.1 as testRuntimeOnly dependency
  • Required by Gradle 9.2.1; implicitly provided in 8.10

ToggleGameEngine.java

  • Fixed mask values missing leading zeros in setMask()
  • Buttons 2, 4, 5, 6, 7, 8 now correctly padded to 9 characters
// Before
mask.put(2, "11001000");   // Wrong: 8 chars
mask.put(8, "1011");       // Wrong: 4 chars

// After  
mask.put(2, "011001000");  // Correct: 9 chars
mask.put(8, "000001011");  // Correct: 9 chars

The mask values are XOR'd with the 9-character board state, so length mismatch caused incorrect toggle behavior.

Original prompt

I don't know why the Autograding Tests are failing, when they did pass when I ran them locally


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits December 4, 2025 16:57
…alues

Co-authored-by: pravinpaudel <181511287+pravinpaudel@users.noreply.github.com>
Co-authored-by: pravinpaudel <181511287+pravinpaudel@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing Autograding Tests Fix autograding test failures: Add JUnit Platform launcher for Gradle 9.2.1 and correct mask values Dec 4, 2025
Copilot AI requested a review from pravinpaudel December 4, 2025 17:02
@pravinpaudel pravinpaudel marked this pull request as ready for review December 4, 2025 17:04
@pravinpaudel pravinpaudel merged commit b9c513e into main Dec 4, 2025
1 check passed
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