Skip to content

Commit

Permalink
Squashed 'packages/TestItemServer/' changes from ba3fb7ae..943ad803
Browse files Browse the repository at this point in the history
943ad803 Update protocol

git-subtree-dir: packages/TestItemServer
git-subtree-split: 943ad8034c6acaff3687b16155881aa0494a6615
  • Loading branch information
davidanthoff committed Jan 18, 2023
1 parent 3e21e3a commit e2986e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/TestItemServer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function run_testitem_handler(conn, params::TestserverRunTestitemRequestParams)
try
Test.finish(ts)

return TestserverRunTestitemRequestParamsReturn("passed", nothing, elapsed_time)
return TestserverRunTestitemRequestParamsReturn("passed", missing, elapsed_time)
catch err
if err isa Test.TestSetException
failed_tests = Test.filter_errors(ts)
Expand Down
13 changes: 8 additions & 5 deletions src/testserver_protocol.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,23 @@ struct Range
start::Position
stop::Position
end
function Range(d::Dict)
Range(Position(d["start"]), Position(d["end"]))
end
function JSON.lower(a::Range)
Dict("start" => a.start, "end" => a.stop)
end

@dict_readable struct Location
JSONRPC.@dict_readable struct Location
uri::String
range::Range
end

@dict_readable struct TestMessage
JSONRPC.@dict_readable struct TestMessage
message::String
# expectedOutput?: string;
# actualOutput?: string;
location::Union{Nothing,Location}
location::Union{Missing,Location}
end

JSONRPC.@dict_readable struct TestserverRunTestitemRequestParams <: JSONRPC.Outbound
Expand All @@ -35,8 +38,8 @@ end

JSONRPC.@dict_readable struct TestserverRunTestitemRequestParamsReturn <: JSONRPC.Outbound
status::String
message::Union{Vector{TestMessage},Nothing}
duration::Union{Float64,Nothing}
message::Union{Vector{TestMessage},Missing}
duration::Union{Float64,Missing}
end

const testserver_revise_request_type = JSONRPC.RequestType("testserver/revise", Nothing, String)
Expand Down

0 comments on commit e2986e3

Please sign in to comment.