Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests related projects #168

Merged
merged 3 commits into from
Feb 19, 2025
Merged

Conversation

filzrev
Copy link
Contributor

@filzrev filzrev commented Feb 17, 2025

This PR intended to update xUnit version to latest v3.
And switch test runner to use Microsoft.Testing.Platform based runner instead of VSTest.

What's changed in this PR.

1. Update test projects to use xUnit.v3 (5247872)

  • 1.1. Update following NuGet packages and fix build errors.
    • Shouldly
    • Microsoft.NET.Test.Sdk
    • xunit -> xunit.v3
    • xunit.runner.visualstudio
  • 1.2. Fix build errors/warnings.

2. Fix test code (0259c36)

  • 2.1. Add tests\Directory.Build.props file and add setting to use Microsoft.Testing.Platform
  • 2.2. Modify CSharpGeneratorRunner.cs and add additional DLL references.
    (It's seems be required when using xunit.runner.visualstudio v2.5.0 or later)
  • 2.3. Implement IDisposable interface on some class and clear Environment.ExitCode on every test run finished.
  • 2.4. Modify assembly version check logics at HelpTest.cs

3. Modify GeneratorSandbox project launch settings (c4a86c0)

@neuecc
Copy link
Member

neuecc commented Feb 19, 2025

Thank you, very helpful!
I've also been trying v3 and Microsoft.Testing.Platform in a different repository recently, and I thought they looked good.

@neuecc neuecc merged commit 511e725 into Cysharp:master Feb 19, 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