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

Logical error conditions #51

Open
7 tasks
cspray opened this issue May 1, 2021 · 0 comments
Open
7 tasks

Logical error conditions #51

cspray opened this issue May 1, 2021 · 0 comments

Comments

@cspray
Copy link
Member

cspray commented May 1, 2021

It is possible that you could wind up setting up Attributes or a configuration in such a way that errors or unrecoverable ambiguities could occur. This is a list of those possibilities so that in future version we can check for them and handle them appropriately. This list will continue to be updated until the project is ready to address this kind of static analysis.

  • Multiple #[DefaultTestSuite] are defined. By definition you can only have 1 default TestSuite. If multiple implementations are defined as default an error should be thrown during compilation.
  • A #[TestSuite] is defined on a TestCase that does not exist. This should result in an error during compilation.
  • A #[TestSuite] is defined on a TestCase that does not extend TestSuite. This should result in an error during compilation.
  • A #[DataProvider] is defined on a method that is not also a #[Test]. This should result in an error during compilation.
  • A #[DataProvider] defines a method that cannot be invoked on the TestCase. This should preferably throw an error during compilation but could resort to runtime error if difficult to achieve.
  • A #[Test] could be specified on a protected or static method. This should result in an error during compilation.
  • An element from a #[DataProvider] method might not return an array with the correct format or the incorrect number of elements. The test for this data set should result in a failure.
@cspray cspray added this to To do in 0.6.0 - Protecting You from You... and my code via automation May 1, 2021
@cspray cspray added this to the 0.6.0 Release milestone May 1, 2021
@cspray cspray removed this from the 0.6.0 Release milestone May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

1 participant