Add Unit Test project#34
Merged
Merged
Conversation
632649a to
ce14269
Compare
There was a problem hiding this comment.
Pull Request Overview
This pull request adds a new unit test project using TUnit for testing the Tokenizer functionality. It also adjusts the PreprocessText method by providing a default parameter for langCode and updates project configuration files accordingly.
- Added default parameter "en-us" to PreprocessText method.
- Configured InternalsVisibleTo in the main project to support unit testing.
- Introduced a new test project with several Tokenizer tests and a CI workflow for building and testing.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| KokoroSharp/Processing/Tokenizer.cs | Updated PreprocessText with a default parameter for langCode |
| KokoroSharp/KokoroSharp.csproj | Added InternalsVisibleTo for unit testing |
| KokoroSharp.sln | Included the new KokoroSharp.Tests project in the solution |
| KokoroSharp.Tests/TokenizerTests.cs | New test file for Tokenizer with various test cases |
| KokoroSharp.Tests/KokoroSharp.Tests.csproj | New project file for unit tests using TUnit |
| .github/workflows/tests.yml | New GitHub Actions workflow configuration for build & test |
Comments suppressed due to low confidence (2)
KokoroSharp/Processing/Tokenizer.cs:84
- Update the XML documentation for PreprocessText to mention the default value for langCode and any related behavior.
internal static string PreprocessText(string text, string langCode = "en-us") {
KokoroSharp.Tests/TokenizerTests.cs:3
- The namespace 'Kokoro.Tests' does not match the project name 'KokoroSharp.Tests'. Consider renaming it for consistency.
namespace Kokoro.Tests;
Lyrcaxis
reviewed
Jun 9, 2025
Lyrcaxis
approved these changes
Jun 9, 2025
PhilippNaused
added a commit
to PhilippNaused/KokoroSharp
that referenced
this pull request
Jun 9, 2025
* Add test project * Add tests for text pre-processor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@Lyrcaxis, you said you weren't particular about the choice of framework, so I used TUnit.