From e2986e3ded3712647c6c570e41d0217bc1edbf6a Mon Sep 17 00:00:00 2001 From: David Anthoff Date: Tue, 17 Jan 2023 19:37:01 -0800 Subject: [PATCH] Squashed 'packages/TestItemServer/' changes from ba3fb7ae..943ad803 943ad803 Update protocol git-subtree-dir: packages/TestItemServer git-subtree-split: 943ad8034c6acaff3687b16155881aa0494a6615 --- src/TestItemServer.jl | 2 +- src/testserver_protocol.jl | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/TestItemServer.jl b/src/TestItemServer.jl index 38d1337..beffc8f 100644 --- a/src/TestItemServer.jl +++ b/src/TestItemServer.jl @@ -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) diff --git a/src/testserver_protocol.jl b/src/testserver_protocol.jl index 4902672..b233254 100644 --- a/src/testserver_protocol.jl +++ b/src/testserver_protocol.jl @@ -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 @@ -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)