Closed johnnychen94 closed 4 years ago
What is the motivation of moving all this code out of its own file and intio core.jl
?
Won't that make it harder to find things?
From the title I thought it was going to turn handlers.jl
into 3 files:
rendered.jl
equality_measures.jl
and preprocessors.jl
.
Aside: moving code and editting code makes for hard to follow diffs.
What is the motivation of moving all this code out of its own file and intio core.jl?
I'm planing to move test_reference
and _test_reference
from core.jl
to test_reference.jl
. After that, what are left in core.jl
are other things related to the core pipeline.
@oxinabox I've tried to minimize the differences for you to review.
Since all codes in handlers.jl
are removed and rewrite using default_rendermode
, default_equality
and preprocess
. It's unavoidable hard to compare and review the diff. I've double-checked them and I'm confident about the logic here.
It comes to an end of my vacation, I need to focus on my school stuff first and then I'll come back continue it.
Since you prefer holding things apart in separate files, I'll move things related to RenderMode
to render.jl
when this PR is ready to be merged.
After this PR:
Test
-corresponding macros like @test_reference_broken
, @test_reference_skip
mind to take a look at it? 👀@oxinabox
The last three commits do a trivial organization work breaking core.jl
into different files. You can review the difference commit by commit.
This PR is a part of #36 that makes the overall pipeline cleaner. It's also a preparation for the introduction of
@test_reference_broken
and@test_reference_skip
.To avoid code duplication, codes in
handler.jl
are broken down into three functions:default_render
that infers the most appropriate render mode according to types offilename
andactual
. By default, it'sBeforeAfterFull()
.default_equality
that infers the suitable equality compare method. By default, it'sisequal
.preprocess
that makesactual
have the same type ofreference
.