guoguibing / librec

LibRec: A Leading Java Library for Recommender Systems, see
https://www.librec.net/
Other
3.23k stars 1.03k forks source link

Adding Diffblue Deeptest generated tests #284

Closed diffblue-assistant closed 5 years ago

diffblue-assistant commented 5 years ago

The test cases contained in this PR were generated by Diffblue's Deeptest software.

One of our missions is to provide useful tests to open source projects. In return, we would appreciate your feedback about our tests to help us further improve our tool.

Results for various open source projects can be viewed at:

http://diff.blue/demo

We welcome any feedback you have on these tests.

SunYatong commented 5 years ago

Hi, thanks for your contributions to our work. But I have found some problems with your codes.

  public void kroneckerProductInputNullNullOutputNullPointerException() {
     // Arrange
    final DenseVector M = null;
    final DenseVector N = null;
     // Act
    thrown.expect(NullPointerException.class);
    DenseVector.kroneckerProduct(M, N);
     // Method is not expected to return due to exception thrown
  }

Due to these issues, we might not merge this PR currently. But thank you all the same. Hope you will fix the problems soon. The "diffblue" project is awesome and we are looking forward to your improvements.

diffblue-assistant commented 5 years ago

@SunYatong - Thank you so much for your feedback.

I have addressed all of your comments and pushed the changes. I've compiled and tested the project and I cannot see any errors. If you encounter any issues then please let me know which commands you are running and what version of JAVA you are using.

I've split the PR into smaller commits so that they are more readable. I do have some other PR's to raise with some tests for other classes which I'll do when you are happy with this PR.

SunYatong commented 5 years ago

@diffblue-assistant Hey buddy, thanks for your hard work. But I'm very curious about your tests with the inexistent classes: librec.data.DenseVector, librec.util.KernelSmoothing and librec.util.Measures. How did you conduct them without error?

In addition, it would be helpful to add more comments about the purpose of each test.

diffblue-assistant commented 5 years ago

@SunYatong Thank you for the quick reply as always.

I think understand where the confusion lies, we've analysed the master branch e.g. https://github.com/guoguibing/librec/blob/master/librec/src/main/java/librec/data/DenseVector.java and we are trying to commit the tests into that branch.

Would you prefer us to analyse the 3.0.0 branch and re-submit? We can submit these new tests with an explanation of what they are doing.