Pull requests will NOT be approved until these conditions are met. These requirements will ensure that the code can easily be maintained and worked on by multiple contributers. It will also help maintain the integrity and reliability of the code base.
- Please view LeastCommonMultiple() and follow the syntax for naming conventions, command styles, indentations, and line breaks
- TODO, formalize style
- Functions should contain short and long versions
- Example:
- LeastCommonMultiple()
- LCM()
- All methods must have a corresponding macro
- Both long and short versions
- Unit tests must accompany new functions.
- Any bug fixes should add a new test case to the existing unit test
Running Unit Tests with ZPM is extremely simple. Once in the ZPM prompt, you can run "objectscript-math test. This will run the Unit Tests and provide a link to the results. Before following the link to the results, you can quickly check the output for success if "ALL PASSED"
SAMPLES>zpm
zpm: SAMPLES>objectscript-math test
- Check if ^UnitTestRoot is defined
- If it is already defined
- Move the contents of UnitTests to the path of ^UnitTestRoot + "/ObjectScript-Math/"
- If it is not defined
- Either point ^UnitTestRoot to the path of the UnitTests directory on your system or create a new directory for unit tests, set ^UnitTestRoot to this new directory, and then follow the steps for already having ^UnitTestRoot defined
- If it is already defined
- Note: if your unit test directory is not in your git repo, you will need to manually move files to get updated tests
After Unit Tests are configured, run the following:
Do ##class(%UnitTest.Manager).RunTest("ObjectScript-Math")
You can optionally include the second parameter of "/nodelete", which will not delete the classes inside of Caché/InterSystems IRIS. This can be useful if you are modifying the Unit Test and your class is not stored on the local file system.