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

rework default_rendermode and add tests for render #66

Open
wants to merge 4 commits into
base: jc/test
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 40 additions & 40 deletions src/render.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,57 +9,57 @@ struct BeforeAfterLimited <: BeforeAfter end
struct BeforeAfterFull <: BeforeAfter end
struct BeforeAfterImage <: BeforeAfter end

render_item(::RenderMode, item) = println(item)
function render_item(::BeforeAfterLimited, item)
show(IOContext(stdout, :limit=>true, :displaysize=>(20,80)), "text/plain", item)
println()
render_item(mode::RenderMode, item) = render_item(stdout, mode, item)
Copy link
Member

Choose a reason for hiding this comment

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

I think we might not actually need this one anymore (or in the first place)
since render takes care of making sure we alrways have a IO arg

Suggested change
render_item(mode::RenderMode, item) = render_item(stdout, mode, item)

render_item(io::IO, ::RenderMode, item) = println(io, item)
function render_item(io::IO, ::BeforeAfterLimited, item)
show(IOContext(io, :limit=>true, :displaysize=>(20,80)), "text/plain", item)
println(io)
end
function render_item(::BeforeAfterImage, item)
function render_item(io::IO, ::BeforeAfterImage, item::AbstractMatrix)
# FIXME: encodeimg only support 2d cases right now
str_item = @withcolor ImageInTerminal.encodeimg(ImageInTerminal.SmallBlocks(), ImageInTerminal.TermColor256(), item, 20, 40)[1]
println("eltype: ", eltype(item))
println("size: ", map(length, axes(item)))
println("thumbnail:")
println.(str_item)
println(io, "eltype: ", eltype(item))
println(io, "size: ", map(length, axes(item)))
println(io, "thumbnail:")
foreach(x->println(io, x), str_item)
end

## 2 arg form render for comparing
function render(mode::BeforeAfter, reference, actual)
println("- REFERENCE -------------------")
render_item(mode, reference)
println("-------------------------------")
println("- ACTUAL ----------------------")
render_item(mode, actual)
println("-------------------------------")
render(mode::RenderMode, args...) = render(stdout, mode, args...)
function render(io::IO, mode::BeforeAfter, reference, actual)
println(io, "- REFERENCE -------------------")
render_item(io, mode, reference)
println(io, "-------------------------------")
println(io, "- ACTUAL ----------------------")
render_item(io, mode, actual)
println(io, "-------------------------------")
end
function render(::Diff, reference, actual)
println("- DIFF ------------------------")
@withcolor println(deepdiff(reference, actual))
println("-------------------------------")
function render(io::IO, ::Diff, reference, actual)
println(io, "- DIFF ------------------------")
@withcolor println(io, deepdiff(reference, actual))
println(io, "-------------------------------")
end

## 1 arg form render for new content
function render(mode::RenderMode, actual)
println("- NEW CONTENT -----------------")
render_item(mode, actual)
println("-------------------------------")
function render(io::IO, mode::RenderMode, actual)
println(io, "- NEW CONTENT -----------------")
render_item(io, mode, actual)
println(io, "-------------------------------")
end

# We set the fallback as limited mode because it is not safe/efficient to fully render anything unless
# * we have prior information that it is not long -- numbers
Copy link
Member

Choose a reason for hiding this comment

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

but if it is not long, then BeforeAfterLimitted and BeforeAfter will be the same

# * or, we know how to fully render it efficiently without sending too much noise to IO
# - Diff mode for strings
# - BeforeAfterImage for images
# Arrays, in general, should be rendered using limited mode.
"""
default_rendermode(::DataFormat, actual)
default_rendermode(actual)
Copy link
Member

Choose a reason for hiding this comment

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

It nolonger gets the actual, only its type?

Suggested change
default_rendermode(actual)
default_rendermode(typeof(actual))


Infer the most appropriate render mode according to type of reference file and `actual`.
Infer the most appropriate render mode according to type of `actual`.
"""
default_rendermode(::Type{<:DataFormat}, ::Any) = BeforeAfterLimited()
default_rendermode(::Type{<:DataFormat}, ::AbstractString) = Diff()
default_rendermode(::Type{<:DataFormat}, ::AbstractArray{<:Colorant}) = BeforeAfterImage()

# plain TXTs
default_rendermode(::Type{DataFormat{:TXT}}, ::Any) = Diff()
default_rendermode(::Type{DataFormat{:TXT}}, ::AbstractString) = Diff()
default_rendermode(::Type{DataFormat{:TXT}}, ::Number) = BeforeAfterFull()
default_rendermode(::Type{DataFormat{:TXT}}, ::AbstractArray{<:Colorant}) = BeforeAfterImage()

# SHA256
default_rendermode(::Type{DataFormat{:SHA256}}, ::Any) = BeforeAfterFull()
default_rendermode(::Type{DataFormat{:SHA256}}, ::AbstractString) = BeforeAfterFull()
default_rendermode(::Type{DataFormat{:SHA256}}, ::AbstractArray{<:Colorant}) = BeforeAfterLimited()
default_rendermode(::Type) = BeforeAfterLimited()
default_rendermode(::Type{T}) where T<:Number = BeforeAfterFull()
default_rendermode(::Type{T}) where T<:AbstractString = Diff()
default_rendermode(::Type{T}) where T<:AbstractArray{<:AbstractString} = Diff()
default_rendermode(::Type{T}) where T<:AbstractArray{<:Colorant} = BeforeAfterImage()
Comment on lines +61 to +65
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
default_rendermode(::Type) = BeforeAfterLimited()
default_rendermode(::Type{T}) where T<:Number = BeforeAfterFull()
default_rendermode(::Type{T}) where T<:AbstractString = Diff()
default_rendermode(::Type{T}) where T<:AbstractArray{<:AbstractString} = Diff()
default_rendermode(::Type{T}) where T<:AbstractArray{<:Colorant} = BeforeAfterImage()
default_rendermode(::Type) = BeforeAfterLimited()
default_rendermode(::Type{<:Number}) = BeforeAfterFull()
default_rendermode(::Type{<:AbstractString}) = Diff()
default_rendermode(::Type{<:AbstractArray{<:AbstractString}}) = Diff()
default_rendermode(::Type{<:AbstractArray{<:Colorant}}) = BeforeAfterImage()

4 changes: 1 addition & 3 deletions src/test_reference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ function test_reference(
# infer the default rendermode here
# since `nothing` is always passed to this method from
# test_reference(filename::AbstractString, raw_actual; kw...)
if rendermode === nothing
rendermode = default_rendermode(F, raw_actual)
end
rendermode === nothing && (rendermode = default_rendermode(T))
Copy link
Member

Choose a reason for hiding this comment

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

Can't we just change line 97 to be:
rendermode = default_rendermode(T)?


actual = maybe_encode(F, raw_actual; kw...)
# preprocessing when reference file doesn't exists
Expand Down
6 changes: 6 additions & 0 deletions test/references/render/BeforeAfterFull/arr1_compare.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- REFERENCE -------------------
[1 3 5 7; 2 4 6 8]
-------------------------------
- ACTUAL ----------------------
[1 2 3 4 5 6 7 8]
-------------------------------
3 changes: 3 additions & 0 deletions test/references/render/BeforeAfterFull/arr1_new.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- NEW CONTENT -----------------
[1 2 3 4 5 6 7 8]
-------------------------------
6 changes: 6 additions & 0 deletions test/references/render/BeforeAfterFull/arr2_compare.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- REFERENCE -------------------
[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]
-------------------------------
- ACTUAL ----------------------
[1, 4, 7, 10, 13, 16, 19]
-------------------------------
3 changes: 3 additions & 0 deletions test/references/render/BeforeAfterFull/arr2_new.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- NEW CONTENT -----------------
[1, 4, 7, 10, 13, 16, 19]
-------------------------------
6 changes: 6 additions & 0 deletions test/references/render/BeforeAfterFull/arr3_compare.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- REFERENCE -------------------
[1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.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1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0]
-------------------------------
3 changes: 3 additions & 0 deletions test/references/render/BeforeAfterFull/arr3_new.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- NEW CONT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1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0]
-------------------------------
18 changes: 18 additions & 0 deletions test/references/render/BeforeAfterFull/dataframe1_compare.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- REFERENCE -------------------
3×2 DataFrame
│ Row │ v1 │ v2 │
│ │ Int64 │ String │
├─────┼───────┼────────┤
│ 1 │ 1 │ a │
│ 2 │ 2 │ b │
│ 3 │ 3 │ c │
-------------------------------
- ACTUAL ----------------------
3×2 DataFrame
│ Row │ v2 │ v1 │
│ │ Int64 │ String │
├─────┼───────┼────────┤
│ 1 │ 1 │ a │
│ 2 │ 2 │ b │
│ 3 │ 3 │ c │
-------------------------------
9 changes: 9 additions & 0 deletions test/references/render/BeforeAfterFull/dataframe1_new.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- NEW CONTENT -----------------
3×2 DataFrame
│ Row │ v2 │ v1 │
│ │ Int64 │ String │
├─────┼───────┼────────┤
│ 1 │ 1 │ a │
│ 2 │ 2 │ b │
│ 3 │ 3 │ c │
-------------------------------
6 changes: 6 additions & 0 deletions test/references/render/BeforeAfterFull/img1d_1_compare.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- REFERENCE -------------------
Gray{Normed{UInt8,8}}[Gray{N0f8}(0.0), Gray{N0f8}(0.102), Gray{N0f8}(0.2), Gray{N0f8}(0.298), Gray{N0f8}(0.4), Gray{N0f8}(0.502), Gray{N0f8}(0.6), Gray{N0f8}(0.698), Gray{N0f8}(0.8), Gray{N0f8}(0.902)]
-------------------------------
- ACTUAL ----------------------
Gray{Normed{UInt8,8}}[Gray{N0f8}(0.902), Gray{N0f8}(0.8), Gray{N0f8}(0.698), Gray{N0f8}(0.6), Gray{N0f8}(0.502), Gray{N0f8}(0.4), Gray{N0f8}(0.298), Gray{N0f8}(0.2), Gray{N0f8}(0.102), Gray{N0f8}(0.0)]
-------------------------------
Copy link
Member Author

Choose a reason for hiding this comment

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

How each pixel is rendered may change from versions to versions, in that case, the test will fail, but we may just regenerate these.

Cref: JuliaGraphics/ColorTypes.jl#202

3 changes: 3 additions & 0 deletions test/references/render/BeforeAfterFull/img1d_1_new.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- NEW CONTENT -----------------
Gray{Normed{UInt8,8}}[Gray{N0f8}(0.902), Gray{N0f8}(0.8), Gray{N0f8}(0.698), Gray{N0f8}(0.6), Gray{N0f8}(0.502), Gray{N0f8}(0.4), Gray{N0f8}(0.298), Gray{N0f8}(0.2), Gray{N0f8}(0.102), Gray{N0f8}(0.0)]
-------------------------------
6 changes: 6 additions & 0 deletions test/references/render/BeforeAfterFull/img1d_2_compare.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- REFERENCE -------------------
Gray{Normed{UInt8,8}}[Gray{N0f8}(0.0), Gray{N0f8}(0.102), Gray{N0f8}(0.2), Gray{N0f8}(0.298), Gray{N0f8}(0.4), Gray{N0f8}(0.502), Gray{N0f8}(0.6), Gray{N0f8}(0.698), Gray{N0f8}(0.8), Gray{N0f8}(0.902)]
-------------------------------
- ACTUAL ----------------------
Gray{Normed{UInt8,8}}[Gray{N0f8}(0.0), Gray{N0f8}(0.051), Gray{N0f8}(0.102), Gray{N0f8}(0.149), Gray{N0f8}(0.2), Gray{N0f8}(0.251), Gray{N0f8}(0.298), Gray{N0f8}(0.349), Gray{N0f8}(0.4), Gray{N0f8}(0.451), Gray{N0f8}(0.502), Gray{N0f8}(0.549), Gray{N0f8}(0.6), Gray{N0f8}(0.651), Gray{N0f8}(0.698), Gray{N0f8}(0.749), Gray{N0f8}(0.8), Gray{N0f8}(0.851), Gray{N0f8}(0.902), Gray{N0f8}(0.949)]
-------------------------------
3 changes: 3 additions & 0 deletions test/references/render/BeforeAfterFull/img1d_2_new.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- NEW CONTENT -----------------
Gray{Normed{UInt8,8}}[Gray{N0f8}(0.0), Gray{N0f8}(0.051), Gray{N0f8}(0.102), Gray{N0f8}(0.149), Gray{N0f8}(0.2), Gray{N0f8}(0.251), Gray{N0f8}(0.298), Gray{N0f8}(0.349), Gray{N0f8}(0.4), Gray{N0f8}(0.451), Gray{N0f8}(0.502), Gray{N0f8}(0.549), Gray{N0f8}(0.6), Gray{N0f8}(0.651), Gray{N0f8}(0.698), Gray{N0f8}(0.749), Gray{N0f8}(0.8), Gray{N0f8}(0.851), Gray{N0f8}(0.902), Gray{N0f8}(0.949)]
-------------------------------
6 changes: 6 additions & 0 deletions test/references/render/BeforeAfterFull/img1d_3_compare.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- REFERENCE -------------------
RGB{Normed{UInt8,8}}[RGB{N0f8}(0.0,0.0,0.0), RGB{N0f8}(0.102,0.102,0.102), RGB{N0f8}(0.2,0.2,0.2), RGB{N0f8}(0.298,0.298,0.298), RGB{N0f8}(0.4,0.4,0.4), RGB{N0f8}(0.502,0.502,0.502), RGB{N0f8}(0.6,0.6,0.6), RGB{N0f8}(0.698,0.698,0.698), RGB{N0f8}(0.8,0.8,0.8), RGB{N0f8}(0.902,0.902,0.902)]
-------------------------------
- ACTUAL ----------------------
RGB{Normed{UInt8,8}}[RGB{N0f8}(0.0,0.0,0.0), RGB{N0f8}(0.102,0.102,0.102), RGB{N0f8}(0.2,0.2,0.2), RGB{N0f8}(0.298,0.298,0.298), RGB{N0f8}(0.4,0.4,0.4), RGB{N0f8}(0.502,0.502,0.502), RGB{N0f8}(0.6,0.6,0.6), RGB{N0f8}(0.698,0.698,0.698), RGB{N0f8}(0.8,0.8,0.8), RGB{N0f8}(0.902,0.902,0.902)]
-------------------------------
3 changes: 3 additions & 0 deletions test/references/render/BeforeAfterFull/img1d_3_new.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- NEW CONTENT -----------------
RGB{Normed{UInt8,8}}[RGB{N0f8}(0.0,0.0,0.0), RGB{N0f8}(0.102,0.102,0.102), RGB{N0f8}(0.2,0.2,0.2), RGB{N0f8}(0.298,0.298,0.298), RGB{N0f8}(0.4,0.4,0.4), RGB{N0f8}(0.502,0.502,0.502), RGB{N0f8}(0.6,0.6,0.6), RGB{N0f8}(0.698,0.698,0.698), RGB{N0f8}(0.8,0.8,0.8), RGB{N0f8}(0.902,0.902,0.902)]
-------------------------------
6 changes: 6 additions & 0 deletions test/references/render/BeforeAfterFull/img2d_1_compare.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- REFERENCE -------------------
Gray{Normed{UInt8,8}}[Gray{N0f8}(0.0) Gray{N0f8}(0.2) Gray{N0f8}(0.4) Gray{N0f8}(0.6) Gray{N0f8}(0.8); Gray{N0f8}(0.102) Gray{N0f8}(0.298) Gray{N0f8}(0.502) Gray{N0f8}(0.698) Gray{N0f8}(0.902)]
-------------------------------
- ACTUAL ----------------------
Gray{Normed{UInt8,8}}[Gray{N0f8}(0.902) Gray{N0f8}(0.698) Gray{N0f8}(0.502) Gray{N0f8}(0.298) Gray{N0f8}(0.102); Gray{N0f8}(0.8) Gray{N0f8}(0.6) Gray{N0f8}(0.4) Gray{N0f8}(0.2) Gray{N0f8}(0.0)]
-------------------------------
3 changes: 3 additions & 0 deletions test/references/render/BeforeAfterFull/img2d_1_new.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- NEW CONTENT -----------------
Gray{Normed{UInt8,8}}[Gray{N0f8}(0.902) Gray{N0f8}(0.698) Gray{N0f8}(0.502) Gray{N0f8}(0.298) Gray{N0f8}(0.102); Gray{N0f8}(0.8) Gray{N0f8}(0.6) Gray{N0f8}(0.4) Gray{N0f8}(0.2) Gray{N0f8}(0.0)]
-------------------------------
26 changes: 26 additions & 0 deletions test/references/render/BeforeAfterFull/img3d_1_compare.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- REFERENCE -------------------
Gray{Normed{UInt8,8}}[Gray{N0f8}(0.0) Gray{N0f8}(0.039) Gray{N0f8}(0.078) Gray{N0f8}(0.122); Gray{N0f8}(0.02) Gray{N0f8}(0.059) Gray{N0f8}(0.102) Gray{N0f8}(0.141)]

Gray{Normed{UInt8,8}}[Gray{N0f8}(0.161) Gray{N0f8}(0.2) Gray{N0f8}(0.239) Gray{N0f8}(0.278); Gray{N0f8}(0.18) Gray{N0f8}(0.22) Gray{N0f8}(0.259) Gray{N0f8}(0.298)]

Gray{Normed{UInt8,8}}[Gray{N0f8}(0.322) Gray{N0f8}(0.361) Gray{N0f8}(0.4) Gray{N0f8}(0.439); Gray{N0f8}(0.341) Gray{N0f8}(0.38) Gray{N0f8}(0.42) Gray{N0f8}(0.459)]

Gray{Normed{UInt8,8}}[Gray{N0f8}(0.478) Gray{N0f8}(0.522) Gray{N0f8}(0.561) Gray{N0f8}(0.6); Gray{N0f8}(0.502) Gray{N0f8}(0.541) Gray{N0f8}(0.58) Gray{N0f8}(0.62)]

Gray{Normed{UInt8,8}}[Gray{N0f8}(0.639) Gray{N0f8}(0.678) Gray{N0f8}(0.722) Gray{N0f8}(0.761); Gray{N0f8}(0.659) Gray{N0f8}(0.698) Gray{N0f8}(0.741) Gray{N0f8}(0.78)]

Gray{Normed{UInt8,8}}[Gray{N0f8}(0.8) Gray{N0f8}(0.839) Gray{N0f8}(0.878) Gray{N0f8}(0.922); Gray{N0f8}(0.82) Gray{N0f8}(0.859) Gray{N0f8}(0.902) Gray{N0f8}(0.941)]
-------------------------------
- ACTUAL ----------------------
Gray{Normed{UInt8,8}}[Gray{N0f8}(0.949) Gray{N0f8}(0.91) Gray{N0f8}(0.871) Gray{N0f8}(0.831); Gray{N0f8}(0.929) Gray{N0f8}(0.89) Gray{N0f8}(0.851) Gray{N0f8}(0.812)]

Gray{Normed{UInt8,8}}[Gray{N0f8}(0.788) Gray{N0f8}(0.749) Gray{N0f8}(0.71) Gray{N0f8}(0.671); Gray{N0f8}(0.769) Gray{N0f8}(0.729) Gray{N0f8}(0.69) Gray{N0f8}(0.651)]

Gray{Normed{UInt8,8}}[Gray{N0f8}(0.631) Gray{N0f8}(0.588) Gray{N0f8}(0.549) Gray{N0f8}(0.51); Gray{N0f8}(0.612) Gray{N0f8}(0.569) Gray{N0f8}(0.529) Gray{N0f8}(0.49)]

Gray{Normed{UInt8,8}}[Gray{N0f8}(0.471) Gray{N0f8}(0.431) Gray{N0f8}(0.388) Gray{N0f8}(0.349); Gray{N0f8}(0.451) Gray{N0f8}(0.412) Gray{N0f8}(0.369) Gray{N0f8}(0.329)]

Gray{Normed{UInt8,8}}[Gray{N0f8}(0.31) Gray{N0f8}(0.271) Gray{N0f8}(0.231) Gray{N0f8}(0.188); Gray{N0f8}(0.29) Gray{N0f8}(0.251) Gray{N0f8}(0.212) Gray{N0f8}(0.169)]

Gray{Normed{UInt8,8}}[Gray{N0f8}(0.149) Gray{N0f8}(0.11) Gray{N0f8}(0.071) Gray{N0f8}(0.031); Gray{N0f8}(0.129) Gray{N0f8}(0.09) Gray{N0f8}(0.051) Gray{N0f8}(0.012)]
-------------------------------
13 changes: 13 additions & 0 deletions test/references/render/BeforeAfterFull/img3d_1_new.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
- NEW CONTENT -----------------
Gray{Normed{UInt8,8}}[Gray{N0f8}(0.949) Gray{N0f8}(0.91) Gray{N0f8}(0.871) Gray{N0f8}(0.831); Gray{N0f8}(0.929) Gray{N0f8}(0.89) Gray{N0f8}(0.851) Gray{N0f8}(0.812)]

Gray{Normed{UInt8,8}}[Gray{N0f8}(0.788) Gray{N0f8}(0.749) Gray{N0f8}(0.71) Gray{N0f8}(0.671); Gray{N0f8}(0.769) Gray{N0f8}(0.729) Gray{N0f8}(0.69) Gray{N0f8}(0.651)]

Gray{Normed{UInt8,8}}[Gray{N0f8}(0.631) Gray{N0f8}(0.588) Gray{N0f8}(0.549) Gray{N0f8}(0.51); Gray{N0f8}(0.612) Gray{N0f8}(0.569) Gray{N0f8}(0.529) Gray{N0f8}(0.49)]

Gray{Normed{UInt8,8}}[Gray{N0f8}(0.471) Gray{N0f8}(0.431) Gray{N0f8}(0.388) Gray{N0f8}(0.349); Gray{N0f8}(0.451) Gray{N0f8}(0.412) Gray{N0f8}(0.369) Gray{N0f8}(0.329)]

Gray{Normed{UInt8,8}}[Gray{N0f8}(0.31) Gray{N0f8}(0.271) Gray{N0f8}(0.231) Gray{N0f8}(0.188); Gray{N0f8}(0.29) Gray{N0f8}(0.251) Gray{N0f8}(0.212) Gray{N0f8}(0.169)]

Gray{Normed{UInt8,8}}[Gray{N0f8}(0.149) Gray{N0f8}(0.11) Gray{N0f8}(0.071) Gray{N0f8}(0.031); Gray{N0f8}(0.129) Gray{N0f8}(0.09) Gray{N0f8}(0.051) Gray{N0f8}(0.012)]
-------------------------------
6 changes: 6 additions & 0 deletions test/references/render/BeforeAfterFull/num1_compare.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- REFERENCE -------------------
1
-------------------------------
- ACTUAL ----------------------
2
-------------------------------
3 changes: 3 additions & 0 deletions test/references/render/BeforeAfterFull/num1_new.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- NEW CONTENT -----------------
2
-------------------------------
6 changes: 6 additions & 0 deletions test/references/render/BeforeAfterFull/str1_compare.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- REFERENCE -------------------
Hello world
-------------------------------
- ACTUAL ----------------------
hello World
-------------------------------
3 changes: 3 additions & 0 deletions test/references/render/BeforeAfterFull/str1_new.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- NEW CONTENT -----------------
hello World
-------------------------------
6 changes: 6 additions & 0 deletions test/references/render/BeforeAfterFull/str2_compare.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- REFERENCE -------------------
[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]
-------------------------------
- ACTUAL ----------------------
[1, 4, 7, 10, 13, 16, 19]
-------------------------------
3 changes: 3 additions & 0 deletions test/references/render/BeforeAfterFull/str2_new.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- NEW CONTENT -----------------
[1, 4, 7, 10, 13, 16, 19]
-------------------------------
Loading