Thank you for addressing one of the biggest complaints I had about developing scripts with Papyrus. The current cycle of 'develop', 'execute the game', 'hope your printf debug helps you figure out whats wrong' is tedious. Now I can have some level of assurance that my code is doing what it should be.
For fun, here is a real-world set of test results from Frostfall tests I'm currently writing. Here, I discovered that one of my arrays isn't being correctly resorted.
As a developer, I am glad you took the time to create this. This will be a great tool to ensure the quality and consistency of scripts. I will be using this a whirl while I am revamping one of my mods to work with Frostfall 3.
14 comments
Papyrus allows to write a logical expression directly to the function argument, like this:
;int i = expectInt(x1 >= min && x1 <= max, x1, y1); returns x1 if, x1 in range min - max, otherwise returns y1
int function expectInt(bool cond, int x1, int y1) global
if(cond)
return(x1)
endIf
return(y1)
endFunction
And it's much easier
THANK YOU <3
Here is the test suite.