Skip to content

Skubiak0903/McJava-Test-Gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

McJava Test Generator

McJava Test Generator automatically creates test cases for the McJava compiler.
It helps verify if the compiler works correctly before committing changes.


🧪 Overview

  • What it does:
    Generates various tests to validate the McJava compiler.

  • Can I run it in Minecraft?
    It can generate Minecraft datapack-compatible .mcfunction tests.
    However, some tests may fail due to missing advancements, 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>

⚙️ Installation (Windows / MinGW-w64)

  1. Install MinGW-w64

  2. Clone the repository

    git clone https://github.com/Skubiak0903/McJava-Test-Gen.git
    cd McJava-Test-Gen
  3. Compile using g++

    g++ -std=c++17 -O2 -Wall -Wextra -o main.exe src/*.cpp

    (Adjust the path to your .cpp files if needed)

  4. Run the program
    Examples:

    ./main.exe
    ./main.exe -cmd=<command>
    ./main.exe -perm_lvl=<permission level>
    ./main.exe -cmd=<command> -perm_lvl=<permission level>

💬 Feedback

Found a bug or have a suggestion?
Please open an issue — all feedback is welcome!

👤 Authors

@Skubiak0903


About

Automatic test generator for McJava

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages