RelationalAI-oss / Rematch.jl

Pattern matching
Other
52 stars 6 forks source link

Wrap all tests in TestSets. #10

Closed NHDaly closed 5 years ago

NHDaly commented 5 years ago

As we've now learned, it's good to have all tests wrapped in a @testset so you get test reporting and tests continue on failures.

The one complication here is that you can't do top-level statements directly from within the TestSet. So I added @eval before all type definitions. (See https://github.com/JuliaLang/julia/issues/23794). That restriction doesn't apply if you are including the file from within a testset, so i moved the tests to test/rematch.jl, but it still seems like it makes sense to keep the structs next to their tests inside each testset, so i didn't move them out.

codecov-io commented 5 years ago

Codecov Report

Merging #10 into Rematch-field-names will increase coverage by 7.03%. The diff coverage is n/a.

Impacted file tree graph

@@                   Coverage Diff                   @@
##           Rematch-field-names      #10      +/-   ##
=======================================================
+ Coverage                85.93%   92.96%   +7.03%     
=======================================================
  Files                        1        1              
  Lines                      128      128              
=======================================================
+ Hits                       110      119       +9     
+ Misses                      18        9       -9
Impacted Files Coverage Δ
src/Rematch.jl 92.96% <0%> (+7.03%) :arrow_up:

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 1ca9715...9d053db. Read the comment docs.

NHDaly commented 5 years ago

SGTM! I'll merge now then. :)

raileywild commented 5 years ago

thanks @NHDaly!