fauton
fauton copied to clipboard
Validate inputs for config, when testing automata
Right now there is no validation for Automata testing configs.
const finiteAutomataTest = new FiniteAutomataTest();
finiteAutomataTest.test([
{
automaton: null,
options: {
type: 'generate',
range: {
maxLength: 10,
},
outputFiles: {
input: false,
rejected: false,
incorrect: false,
},
},
},
]);
- Not passing the logs directory should throw an error.
- Not passing a valid automaton should throw an error
- Not passing
typeforoptionswould throw an error - Not passing
file,generateorcustomforoptions.typewould throw an error. - For
file,generateorcustomoptions.typethe relevant properties must be present - When
options.typeisgenerateandrandomwe should check whethertotalnumber of unique random numbers can be generated from the givenminLengthandmaxLength