Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
domluna committed Sep 28, 2023
1 parent ca3032a commit 9edea60
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions test/sciml_style.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
m.inv_match === nothing && throw(ArgumentError("Backwards matching not defined. `complete` the matching first."))
"""
formatted_str = raw"""
@noinline require_complete(m::Matching) = m.inv_match === nothing &&
throw(ArgumentError("Backwards matching not defined. `complete` the matching first."))
@noinline require_complete(m::Matching) = m.inv_match === nothing && throw(
ArgumentError("Backwards matching not defined. `complete` the matching first."),
)
"""
@test format_text(str, SciMLStyle()) == formatted_str

Expand Down Expand Up @@ -34,9 +35,11 @@
BipartiteGraph(fadj::AbstractVector, badj::Union{AbstractVector,Integer} = maximum(maximum, fadj); metadata = nothing) = BipartiteGraph(mapreduce(length, +, fadj; init = 0), fadj, badj, metadata)
"""
formatted_str = raw"""
function BipartiteGraph(fadj::AbstractVector,
function BipartiteGraph(
fadj::AbstractVector,
badj::Union{AbstractVector, Integer} = maximum(maximum, fadj);
metadata = nothing)
metadata = nothing,
)
BipartiteGraph(mapreduce(length, +, fadj; init = 0), fadj, badj, metadata)
end
"""
Expand Down Expand Up @@ -110,7 +113,8 @@
"""

formatted_str1 = raw"""
Dict{Int, Int}(1 => 2,
Dict{Int, Int}(
1 => 2,
3 => 4)
"""

Expand All @@ -131,7 +135,8 @@
"""

formatted_str1 = raw"""
SVector(1.0,
SVector(
1.0,
2.0)
"""

Expand All @@ -154,8 +159,10 @@
"""

formatted_str = raw"""
Dict{Int, Int}(1 => 2,
3 => 4)
Dict{Int, Int}(
1 => 2,
3 => 4,
)
"""

formatted_str_yas_nesting = raw"""
Expand All @@ -177,7 +184,8 @@

formatted_str1 = raw"""
SomeLongerTypeThanJustString = String
y = Dict{Int, SomeLongerTypeThanJustString}(1 => "some arbitrary string bla bla bla bla bla bla",
y = Dict{Int, SomeLongerTypeThanJustString}(
1 => "some arbitrary string bla bla bla bla bla bla",
2 => "another longer arbitrary string bla bla bla bla bla bla bla bla")
"""

Expand Down Expand Up @@ -236,7 +244,8 @@
"""

formatted_str1 = raw"""
Dict{Int, Int}(1 => 2,
Dict{Int, Int}(# Comment
1 => 2,
3 => 4)
"""

Expand Down

0 comments on commit 9edea60

Please sign in to comment.