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

Property based testing #1

Open
tommschowar opened this issue Mar 10, 2022 · 1 comment
Open

Property based testing #1

tommschowar opened this issue Mar 10, 2022 · 1 comment

Comments

@tommschowar
Copy link

(Skip to Questions if you are not interested why I opened this issue)
I am the author of the unit test framework TTEST for matlab/octave which features a limited form of property based testing.
Property based tests check whether a function abides by some properties, e.g. is idempotent.
For that it needs to generate a wide range of different inputs, e.g. matrices.

I already have a generator for matrices, but it is far from good yet. Especially it is hard to specify which properties the output matrices shall have. Currently, my generators only can generate matrices with a random set of properties. So I wonder whether it is possible to use anymatrix to generate random matrices with pre-defined properties.

Questions

  • Is it possible to add an interface so that anymatrix returns random matrices with randomly pre-defined properties?
  • Would you be willing to do it. If not, do you accept pull requests?
  • Can anymatrix be ported to Octave?
@mmikaitis
Copy link
Collaborator

mmikaitis commented Mar 10, 2022

Hi. Many thanks for your questions.

First question: I think this is already possible with Anymatrix by first randomly picking properties, then searching by those properties, and then generating the returned matrices with random parameters. This use case is probably too specialized to justify a separate command in the Anymatrix interface, and it should be implemented externally using the existent commands.

Second question: We will consider pull requests with any useful improvements or bug fixes to anymatrix.

Third question: It most likely can be done, but there would need to be a big user group that needs Anymatrix in Octave. Many of the internal things we used, such as pattern matching and extracting functionalities recently introduced in MATLAB, would probably need to be changed when working with Octave.

-- Mantas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants