Skip to content

Add test module and auto-discovery for XTC tests#1

Merged
lagergren merged 4 commits into
masterfrom
lagergren/test
Jan 22, 2026
Merged

Add test module and auto-discovery for XTC tests#1
lagergren merged 4 commits into
masterfrom
lagergren/test

Conversation

@lagergren
Copy link
Copy Markdown
Contributor

Summary

  • Refactored HelloWorld.x to extract a testable formatGreeting() function
  • Added HelloWorldTest.x test module demonstrating xunit test patterns
  • Added documentation in build.gradle.kts explaining test auto-discovery

Note: This PR cannot be merged until the plugin bugfix that restores test auto-discovery functionality is merged.

Test plan

  • Verify the plugin bugfix for test auto-discovery is merged first
  • Run ./gradlew build to confirm tests are discovered and executed
  • Verify all 5 test cases in HelloWorldTest.x pass

🤖 Generated with Claude Code

…ally. NOTE: This cannot go in until we have the plugin bugfix that restores this functionality merged.
@lagergren lagergren requested a review from thegridman January 20, 2026 11:24
lagergren and others added 3 commits January 20, 2026 12:26
The wrapper validation is already included in gradle/actions/setup-gradle@v4,
making the standalone action redundant.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Testing if the build passes without the test module to isolate the
plugin dependency issue.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Re-enabling tests - CI will fail until the plugin fix is merged.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lagergren
Copy link
Copy Markdown
Contributor Author

CI Status

⚠️ CI is expected to fail until the XDK plugin fix is merged.

The test module (HelloWorldTest.x) imports from the main source set (HelloWorld), but the current plugin doesn't properly wire up the test compilation task's module path to include the main source set's compiled output. This causes:

Error: COMPILER-24: Cannot find a module "HelloWorld".

Blocked by: xtclang/xvm#373

Once that PR is merged and a new XDK is published, we'll rerun CI to verify everything works.

@lagergren lagergren merged commit ebb73b8 into master Jan 22, 2026
1 of 2 checks 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.

1 participant