-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stub tests that test fallback not-shared functionality
- Loading branch information
Showing
4 changed files
with
90 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
require 'test_helper' | ||
|
||
class TestSysVInteger < MiniTest::Unit::TestCase | ||
CLASS = ::Semian::SysV::Integer | ||
|
||
def setup | ||
@integer = CLASS.new(name: 'TestSysVInteger', permissions: 0660) | ||
@integer.reset | ||
end | ||
|
||
def teardown | ||
@integer.destroy | ||
end | ||
|
||
include TestSimpleInteger::IntegerTestCases | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
require 'test_helper' | ||
|
||
class TestSysVSlidingWindow < MiniTest::Unit::TestCase | ||
CLASS = ::Semian::SysV::SlidingWindow | ||
|
||
def setup | ||
@sliding_window = CLASS.new(max_size: 6, | ||
name: 'TestSysVSlidingWindow', | ||
permissions: 0660) | ||
@sliding_window.clear | ||
end | ||
|
||
def teardown | ||
@sliding_window.destroy | ||
end | ||
|
||
include TestSimpleSlidingWindow::SlidingWindowTestCases | ||
|
||
private | ||
|
||
include TestSimpleSlidingWindow::SlidingWindowUtilityMethods | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
require 'test_helper' | ||
|
||
class TestSysVState < MiniTest::Unit::TestCase | ||
CLASS = ::Semian::SysV::State | ||
|
||
def setup | ||
@state = CLASS.new(name: 'TestSysVState', | ||
permissions: 0660) | ||
@state.reset | ||
end | ||
|
||
def teardown | ||
@state.destroy | ||
end | ||
|
||
include TestSimpleState::StateTestCases | ||
|
||
def test_will_throw_error_when_invalid_symbol_given | ||
# May occur if underlying integer gets into bad state | ||
integer = @state.instance_eval "@integer" | ||
integer.value = 100 | ||
assert_raises ArgumentError do | ||
@state.value | ||
end | ||
assert_raises ArgumentError do | ||
@state.open? | ||
end | ||
assert_raises ArgumentError do | ||
@state.half_open? | ||
end | ||
assert_raises ArgumentError do | ||
@state.closed? | ||
end | ||
end | ||
end |