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

Make tests more modular #27

Merged
merged 13 commits into from
Jan 22, 2022
Merged

Conversation

sethaxen
Copy link
Member

@sethaxen sethaxen commented Jan 9, 2022

This PR refactors the tests to be more modular, which will make adding tests for additional backends more straightforward. Some notes:

  • each test file is structured so it can be independently included for testing a single component
  • the isa checks in the test functions that special-cased for certain backends now are changed by keyword arguments
  • the test functions and any constants used in them are now declared in test_utils.jl.

test/test_utils.jl Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2022

Codecov Report

Merging #27 (bc3c321) into master (6d7c74c) will decrease coverage by 0.80%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #27      +/-   ##
==========================================
- Coverage   79.51%   78.70%   -0.81%     
==========================================
  Files           2        2              
  Lines         371      371              
==========================================
- Hits          295      292       -3     
- Misses         76       79       +3     
Impacted Files Coverage Δ
src/AbstractDifferentiation.jl 77.77% <0.00%> (-0.86%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d7c74c...bc3c321. Read the comment docs.

test/defaults.jl Outdated Show resolved Hide resolved
Copy link
Contributor

@frankschae frankschae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

test/test_utils.jl Show resolved Hide resolved
@sethaxen sethaxen closed this Jan 22, 2022
@sethaxen sethaxen reopened this Jan 22, 2022
Copy link
Member

@mohamed82008 mohamed82008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mohamed82008 mohamed82008 merged commit 979fa04 into JuliaDiff:master Jan 22, 2022
@mohamed82008
Copy link
Member

Thanks @sethaxen !

@sethaxen sethaxen deleted the refactortests branch January 22, 2022 01:40
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

Successfully merging this pull request may close these issues.

None yet

4 participants