From 9edea60c6d40551ebd22cf3f6a1fa0e724c764cf Mon Sep 17 00:00:00 2001 From: Dominique Luna Date: Wed, 27 Sep 2023 21:14:40 -0400 Subject: [PATCH] fix tests --- test/sciml_style.jl | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/test/sciml_style.jl b/test/sciml_style.jl index c4afe6932..73e13d239 100644 --- a/test/sciml_style.jl +++ b/test/sciml_style.jl @@ -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 @@ -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 """ @@ -110,7 +113,8 @@ """ formatted_str1 = raw""" - Dict{Int, Int}(1 => 2, + Dict{Int, Int}( + 1 => 2, 3 => 4) """ @@ -131,7 +135,8 @@ """ formatted_str1 = raw""" - SVector(1.0, + SVector( + 1.0, 2.0) """ @@ -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""" @@ -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") """ @@ -236,7 +244,8 @@ """ formatted_str1 = raw""" - Dict{Int, Int}(1 => 2, + Dict{Int, Int}(# Comment + 1 => 2, 3 => 4) """