395395 return m
396396 end"""
397397 body, _ = CodeTracking. definition (String, @which Foo. Bar. fit (1 , 2 ))
398- @test body == " Foo.Bar.fit(a, b) = a + b"
398+ if Base. VERSION < v " 1.10"
399+ @test body == " Foo.Bar.fit(a, b) = a + b"
400+ end
399401end
400402
401403struct CallOverload
@@ -414,10 +416,10 @@ end
414416
415417@testset " kwfuncs" begin
416418 body, _ = CodeTracking. definition (String, @which fkw (; x= 1 ))
417- @test body == """
419+ @test startswith ( body, """
418420 function fkw(; x=1)
419421 x
420- end"""
422+ end""" )
421423end
422424
423425@testset " Decorated args" begin
@@ -436,12 +438,12 @@ end
436438 body, _ = CodeTracking. definition (String, which (hasdefault, (Int, Float32)))
437439 @test body == " hasdefault(xd, yd=2) = xd + yd"
438440 body, _ = CodeTracking. definition (String, which (hasdefaulttypearg, (Type{Float32},)))
439- @test body == " hasdefaulttypearg(::Type{T}=Rational{Int}) where T = zero(T)"
441+ @test startswith ( body, " hasdefaulttypearg(::Type{T}=Rational{Int}) where T = zero(T)" )
440442end
441443
442444@testset " tuple-destructured args" begin
443445 body, _ = CodeTracking. definition (String, which (diffminmax, (Any,)))
444- @test body == " diffminmax((min, max)) = max - min"
446+ @test startswith ( body, " diffminmax((min, max)) = max - min" )
445447end
446448
447449@testset " strip_gensym with unicode" begin
0 commit comments