Clematis - ZScript Unit Testing Library

Post your example zscripts/ACS scripts/etc here.

Clematis - ZScript Unit Testing Library

Postby ZippeyKeys12 » Sun Nov 18, 2018 6:33 pm

ZScript unit test framework for GZDoom

See the README for basic instructions.
I plan on adding more features and docs, especially if someone actually uses this.

Allows you to do:
Code: Select allExpand view
class ClematisExample:Clematis{
    void TestSuites(){
        Describe('Testing Player Stats');
            It('MaxHealth', AssertEval(MaxHealth, '<', 100), LOG_Warning);
            It('Math', AssertEval(1+1, '==', 2), LOG_Fatal);
            It('Woot', AssertTrue(exampleBool), LOG_Fatal);

        Describe('Testing Math');
            It('Calculus', AssertFalse(0*1!=0), ERR_Error);
            It('Math', AssertSame(Pointer1, Pointer2, "Custom error mesage"), ERR_Warning);
So you can set up unit testing for your mod.

There's Clematis.Create(<classname>) for creating the object and executing its Init method, so it is preferred over new(<classname>)


Please let me know what I should add/change and of any errors.
Joined: 15 Jun 2016

Return to Script Library

Who is online

Users browsing this forum: No registered users and 0 guests