Repository navigation
Conversation
11 of 12 tasks
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.
Description
This PR adds a new program to the repo - the SplashKit Transpiler.
It automatically scans the specified directory (defaults to
test/unit_tests) for C++ unit tests, and converts them to the target language. A C# translator module is included, for generating C# tests using the xUnit framework.Documentation has been created - please see here for more information on file structure, building, and running the program.
Type of change
Known issues
REQUIRE(VALID_PTR(test, FONT_PTR));, but this is fine since it is irrelevant in C#. The rest of the test generates fine, but font loading is not working for some reason.open_audio()is used - it should be placed outside of each individual Section, to be used as setup for every execution path.circ2) is re-declared inside a child section. The C# translator flattens sections into one scope, so this becomes an issue. This could be handled with re-declared nested variables being renamed.How Has This Been Tested?
Compiled and ran Transpiler in WSL.
Generated tests were verified manually (by eye), and run with
dotnet testto ensure results are aligned with C++.Checklist