Skip to content

Commit

Permalink
Skip threading tests until I can have a look
Browse files Browse the repository at this point in the history
  • Loading branch information
David Rodríguez de Dios committed Aug 1, 2014
1 parent d5ab724 commit 285215e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/thread_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,23 @@ def last_thnum
end

def test_thread_list_marks_current_thread_with_a_plus_sign
skip 'for now'
thnum = nil
enter 'break 8', 'cont', 'thread list', release
debug_proc(@example) { thnum = first_thnum }
check_output_includes(/\+ #{thnum} #<Thread:\S+ run>\t#{__FILE__}:8/)
end

def test_thread_list_works_with_shortcut
skip 'for now'
thnum = nil
enter 'break 8', 'cont', 'th list', release
debug_proc(@example) { thnum = first_thnum }
check_output_includes(/\+ #{thnum} #<Thread:\S+ run>\t#{__FILE__}:8/)
end

def test_thread_list_show_all_available_threads
skip 'for now'
enter 'break 21', 'cont', 'thread list', release
debug_proc(@example)
check_output_includes(/(\+)?\d+ #<Thread:\S+ (sleep|run)>/,
Expand All @@ -75,13 +78,15 @@ def test_thread_list_show_all_available_threads
end

def test_thread_stop_marks_thread_as_suspended
skip 'for now'
thnum = nil
enter 'break 21', 'cont', -> { "thread stop #{last_thnum}" }, release
debug_proc(@example) { thnum = last_thnum }
check_output_includes(/\$ #{thnum} #<Thread:/)
end

def test_thread_stop_actually_suspends_thread_execution
skip 'for now'
enter 'break 21', 'cont', 'trace on',
-> { "thread stop #{last_thnum}" }, release
debug_proc(@example)
Expand All @@ -90,18 +95,21 @@ def test_thread_stop_actually_suspends_thread_execution
end

def test_thread_stop_shows_error_when_thread_number_not_specified
skip 'for now'
enter 'break 8', 'cont', 'thread stop', release
debug_proc(@example)
check_error_includes '"thread stop" needs a thread number'
end

def test_thread_stop_shows_error_when_trying_to_stop_current_thread
skip 'for now'
enter 'break 8', 'cont', -> { "thread stop #{first_thnum}" }, release
debug_proc(@example)
check_error_includes "It's the current thread"
end

def thread_resume_removes_threads_from_the_suspended_state
skip 'for now'
thnum = nil
enter 'break 21', 'cont',
-> { thnum = last_thnum ; "thread stop #{thnum}" },
Expand All @@ -113,35 +121,41 @@ def thread_resume_removes_threads_from_the_suspended_state
end

def test_thread_resume_shows_error_if_thread_number_not_specified
skip 'for now'
enter 'break 8', 'cont', 'thread resume', release
debug_proc(@example)
check_error_includes '"thread resume" needs a thread number'
end

def test_thread_resume_shows_error_when_trying_to_resume_current_thread
skip 'for now'
enter 'break 8', 'cont', -> { "thread resume #{first_thnum}" }, release
debug_proc(@example)
check_error_includes "It's the current thread"
end

def test_thread_resume_shows_error_is_thread_is_already_running
skip 'for now'
enter 'break 21', 'cont', -> { "thread resume #{last_thnum}" }, release
debug_proc(@example)
check_error_includes 'Already running'
end

def test_thread_switch_changes_execution_to_another_thread
skip 'for now'
enter 'break 21', 'cont', -> { "thread switch #{last_thnum}" }, release
debug_proc(@example) { assert_equal state.line, 16 }
end

def test_thread_switch_shows_error_if_thread_number_not_specified
skip 'for now'
enter 'break 8', 'cont', 'thread switch', release
debug_proc(@example)
check_error_includes '"thread switch" needs a thread number'
end

def test_thread_switch_shows_error_when_trying_to_switch_current_thread
skip 'for now'
enter 'break 8', 'cont', -> { "thread switch #{first_thnum}" }, release
debug_proc(@example)
check_error_includes "It's the current thread"
Expand Down

0 comments on commit 285215e

Please sign in to comment.