Skip to content

Validate inputs for config, when testing automata #9

@Devorein

Description

@Devorein

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions