From 6e7ad33758ad6601a6c78b622339b951f9b482e3 Mon Sep 17 00:00:00 2001 From: st0012 Date: Sat, 16 Jul 2022 14:33:15 +0100 Subject: [PATCH] Remove unnecessary detach tests --- CONTRIBUTING.md | 4 ---- test/protocol/detach_test.rb | 31 ------------------------------ test/support/protocol_test_case.rb | 14 -------------- 3 files changed, 49 deletions(-) delete mode 100644 test/protocol/detach_test.rb diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e847e12aa..1ab97e0e0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -393,10 +393,6 @@ Sends request to rdbg to step back from current method. Sends request to rdbg to terminate the debuggee. -- assert_reattach - -Passes if reattaching to rdbg is successful. - - assert_hover_result(expected, expression) Passes if result of `expression` matches `expected`. diff --git a/test/protocol/detach_test.rb b/test/protocol/detach_test.rb deleted file mode 100644 index 0652b5010..000000000 --- a/test/protocol/detach_test.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -__END__ - -require_relative '../support/protocol_test_case' - -module DEBUGGER__ - class DetachTest < ProtocolTestCase - PROGRAM = <<~RUBY - 1| module Foo - 2| class Bar - 3| def self.a - 4| "hello" - 5| end - 6| end - 7| loop do - 8| b = 1 - 9| end - 10| Bar.a - 11| bar = Bar.new - 12| end - RUBY - - def test_detach_reattach_to_rdbg - run_protocol_scenario PROGRAM do - assert_reattach - req_terminate_debuggee - end - end - end -end diff --git a/test/support/protocol_test_case.rb b/test/support/protocol_test_case.rb index a855d3708..8a0049dc9 100644 --- a/test/support/protocol_test_case.rb +++ b/test/support/protocol_test_case.rb @@ -206,20 +206,6 @@ def req_terminate_debuggee close_reader end - def assert_reattach - case get_target_ui - when 'vscode' - req_disconnect - attach_to_dap_server - res = find_crt_dap_response - result_cmd = res.dig(:command) - assert_equal 'configurationDone', result_cmd - when 'chrome' - req_disconnect - attach_to_cdp_server - end - end - def assert_locals_result expected, frame_idx: 0 case get_target_ui when 'vscode'