Adds a check to make sure AgradRev is used for all tests in test/unit/math/rev#3293
Adds a check to make sure AgradRev is used for all tests in test/unit/math/rev#3293SteveBronder wants to merge 6 commits intodevelopfrom
Conversation
…the stan math library
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
Summary
This PR does two things that put us on the path to getting cmake in the math library
See the comment here for the full todo list.
test/unit/math/revuseTEST_F(AgradRevinstead of plainTEST(so that the autodiff stack is cleaned after each test run.test/unit/multiple_translation_unitstest to make sure that it is safe to merge two TUs that both link to the Stan math library.We need (1) because the cmake makes one large binary for the folders we want to test.
(2) ensures that when linking multiple smaller object files via cmake we satisfy the One Definition Rule (ODR). The One Definition Rule says that across translation units (.o files), classes/structs and non-inline functions cannot have more than one definition in the entire program and templates and types cannot have more than one definition by translation unit.
Tests
No new tests
Side Effects
The
make test-math-dependenciesnow has an extra error it can generate in CI that tells the developer that they need to useTEST_F(AgradRevwhen a new rev test is created.Checklist
Copyright holder: Steve Bronder
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
the basic tests are passing
./runTests.py test/unit)make test-headers)make test-math-dependencies)make doxygen)make cpplint)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested