McJava Test Generator automatically creates test cases for the McJava compiler.
It helps verify if the compiler works correctly before committing changes.
-
What it does:
Generates various tests to validate the McJava compiler. -
Can I run it in Minecraft?
It can generate Minecraft datapack-compatible.mcfunctiontests.
However, some tests may fail due to missingadvancements,predictions, or unavailable commands like/op. -
Can I test only specific commands?
Yes!./main.exe -cmd=<command>
-
Can I generate only commands allowed in Minecraft functions? Yes, by limiting the permission level (functions have permission level 2):
./main.exe -perm_lvl=<permission level>
-
Install MinGW-w64
- Download from https://www.mingw-w64.org/downloads/
- During installation, choose architecture x86_64 and make sure to add
mingw64/binto your system PATH.
-
Clone the repository
git clone https://github.com/Skubiak0903/McJava-Test-Gen.git cd McJava-Test-Gen -
Compile using g++
g++ -std=c++17 -O2 -Wall -Wextra -o main.exe src/*.cpp(Adjust the path to your .cpp files if needed)
-
Run the program
Examples:./main.exe ./main.exe -cmd=<command> ./main.exe -perm_lvl=<permission level> ./main.exe -cmd=<command> -perm_lvl=<permission level>
Found a bug or have a suggestion?
Please open an issue — all feedback is welcome!