Skip to content

An open-source testing framework for GameMaker libraries, extensions and (hopefully) prefabs, with a focus on simplicity and ease of use.

License

Notifications You must be signed in to change notification settings

DAndrewBox/GM-Testing-Library

Repository files navigation

GameMaker Testing Library

An open-source testing framework for GameMaker libraries, extensions and (hopefully) prefabs, with a focus on simplicity and ease of use.

license release downloads

🗂️ Compatible with GameMaker versions:

GameMaker GameMaker

📅 Last updated: 2024-07-20


🏆 This project has been nominated for the GameMaker Awards 2024, if you like this project or want to support me, please consider voting for it!


GameMaker Testing Library


✨ Author & Collaborators

Originally created by @DAndrewBox.

github

🙏 Special Thanks & Inspirations


📋 Table of Contents


🧾 Usage Example

// test_player.gml
suite(function() {
  section("Test Player Behaviours", function() {
    test("Should create obj_Player", function() {
      var _obj = create(0, 0, obj_player);
      expect(_obj).toBeGreaterThan(-1);
      instance_destroy(_obj);
    });

    test("Should move obj_Player to the right", function() {
      var _obj = create(0, 0, obj_player);

      simulateKeyHold(vk_right);
      simulateFrameWait(1);
      simulateKeyRelease(vk_right);

      expect(_obj.x).toBeGreaterThan(_obj.xstart);

      instance_destroy(_obj);
    });

    test("Should move obj_Player to the left", function() {
      var _obj = create(0, 0, obj_player);

      simulateKeyHold(vk_left);
      simulateFrameWait(1);
      simulateKeyRelease(vk_left);

      expect(_obj.x).toBeLessThan(_obj.xstart);

      instance_destroy(_obj);
    });
  });
});

📜 License

This project is licensed under the MIT License. See the LICENSE file for more details.


🤝 Contributing

If you want to contribute to this project, you can do so by forking this repository, finding the addecuate branch and submitting a pull request.

You can also submit an issue if you find a bug or want to suggest a new feature, I'm open to add new features to this extension as long as I can see a use for it.

About

An open-source testing framework for GameMaker libraries, extensions and (hopefully) prefabs, with a focus on simplicity and ease of use.

Topics

Resources

License

Stars

Watchers

Forks