fauton icon indicating copy to clipboard operation
fauton copied to clipboard

Validate inputs for config, when testing automata

Open Devorein opened this issue 4 years ago • 0 comments

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,
			},
		},
	},
]);
  1. Not passing the logs directory should throw an error.
  2. Not passing a valid automaton should throw an error
  3. Not passing type for options would throw an error
  4. Not passing file, generate or custom for options.type would throw an error.
  5. For file, generate or custom options.type the relevant properties must be present
  6. When options.type is generate and random we should check whether total number of unique random numbers can be generated from the given minLength and maxLength

Devorein avatar Nov 13 '21 06:11 Devorein