Profile
Best ForComments
Mon, 02/24/2020 - 23:16
#2
added selecting tests by type
Version 1.2 expands the dialog to allow selecting test by type:
By default, only the first and last of these types are checked. Segment range errors and at least some other parameter value errors cause a crash. The "all groups" option is now true by default. To test specific groups, uncheck "all groups" and check the individual groups to be tested. The default settings should result in a test run that doesn't crash the client. Unfortunately, the tests being skipped greatly outnumber the non-crashy ones.
Wed, 02/26/2020 - 00:29
#3
another type, refined error checking
Version 1.3 allows testing for parameter type errors, along with the type of errors allowed in the previous version. The error checking logic has been streamlined somewhat. The function CommonError is used to check for errors that may occur in several functions. In two new return codes have been added. Return code -997 indicates a parameter type error, such as a boolean specified where a numeric was expected. Return code -998 indicates an error in the number of parameters specified. The new features allow running a greater number of tests. Segment range errors still crash the client, along with atom number errors on certain band calls. Avoiding the band functions and the segment range error tests should result in a clean run, although it still means many tests are being skipped. An uppercase "ERROR" appears in the scriptlog when there's an expected return code from one of the tests. Unexpected errors of this type appear in the "test failure" counts at the end of each function group and the very end of the recipe. |
|
Safe Fun tests many of the Foldit Lua functions for common parameter errors.
Safe Fun demonstrates the use of the Lua pcall function to trap errors which normally terminate a recipe. Each function tested has a wrapper function which handles the pcall and checks for specific errors.
Safe Fun lets you select functions by group:
Some of the newer functions are not yet included.
As of February 2020, segment range errors crash Foldit, so many of the groups will fail. The behavior group doesn't work with individual segments, so it can be used to test normal completion of the recipe.