pez-globo / pufferfish-software

All software for the Pufferfish ventilator.
Apache License 2.0
0 stars 1 forks source link

messages: fix failing test cases #317

Closed rohanpurohit closed 3 years ago

rohanpurohit commented 3 years ago

This PR fixes the failing assertions in messages.cpp, These tests should have failed and I fixed them These were leftover from a previous iteration where the message types structs were not initialized to 0 and therefore the output buffer that was generated was incorrect. Although it's still unclear why GitHub actions passed in the PR whereas it should have failed for each commit, certainly might be worth looking at either TestCatch2 or GitHub actions behavior for the same. Another interesting observation I had was the test cases on my computer always passed and failed only after removing the std::string operator, whereas they should have failed each time, this might be something related to my computer or how I was running the tests and not the library itself as I had the behavior mirroring the GitHub actions and merged commit on my laptop. This is definitely isolated to the test cases in this file and not the test cases that are merged previously.

ethanjli commented 3 years ago

The tests run fine on my computer now. In the PR description, can you describe what was behaving incorrectly, why it was behaving incorrectly, and what you did to make it behave correctly?

For records-keeping:

  1. This project is licensed under Apache License v2.0 for any software, and Solderpad Hardware License v2.1 for any hardware - do you agree that your contributions to this project will be under these licenses, too?
  2. Were any of these contributions also part of work you did for an employer or a client?
  3. Does this work include, or is it based on, any third-party work which you did not create?
rohanpurohit commented 3 years ago
  1. This project is licensed under Apache License v2.0 for any software, and Solderpad Hardware License v2.1 for any hardware - do you agree that your contributions to this project will be under these licenses, too? Yes.
  2. Were any of these contributions also part of work you did for an employer or a client? No.
  3. Does this work include, or is it based on, any third-party work which you did not create? No.