Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate inputs for config, when testing automata #9

Open
Devorein opened this issue Nov 13, 2021 · 0 comments
Open

Validate inputs for config, when testing automata #9

Devorein opened this issue Nov 13, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Devorein
Copy link
Member

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 Devorein self-assigned this Nov 13, 2021
@Devorein Devorein added the bug Something isn't working label Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant