https://github.com/JuliaLang/julia
Raw File
Tip revision: bd4464b61b1fdd8688dfc53f646970d27c3bb25c authored by Jameson Nash on 29 February 2024, 22:18:08 UTC
codegen: add a pass for late conversion of known modify ops to call atomicrmw
Tip revision: bd4464b
test_sourcepath.jl
# This file is a part of Julia. License is MIT: https://julialang.org/license

# source path in tasks
path = Base.source_path()::String # this variable is leaked to the source script
@test endswith(path, joinpath("test", "test_sourcepath.jl"))
@test isabspath(path)

@test let ct = current_task()
    yieldto(@task yieldto(ct, Base.source_path()))
end === ""

@test let ct = current_task()
    yieldto(@task schedule(ct, Base.source_path()))
end === ""

@test let ct = current_task(),
    t = @task Base.source_path()
    schedule(ct)
    yieldto(t)
    fetch(t)
end === ""

@test @__FILE__() == path
back to top