aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/journey/nfa/transition_table_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/journey/nfa/transition_table_test.rb')
-rw-r--r--actionpack/test/journey/nfa/transition_table_test.rb40
1 files changed, 20 insertions, 20 deletions
diff --git a/actionpack/test/journey/nfa/transition_table_test.rb b/actionpack/test/journey/nfa/transition_table_test.rb
index 1248082c03..81f9501688 100644
--- a/actionpack/test/journey/nfa/transition_table_test.rb
+++ b/actionpack/test/journey/nfa/transition_table_test.rb
@@ -1,4 +1,4 @@
-require 'abstract_unit'
+require "abstract_unit"
module ActionDispatch
module Journey
@@ -9,55 +9,55 @@ module ActionDispatch
end
def test_eclosure
- table = tt '/'
+ table = tt "/"
assert_equal [0], table.eclosure(0)
- table = tt ':a|:b'
+ table = tt ":a|:b"
assert_equal 3, table.eclosure(0).length
- table = tt '(:a|:b)'
+ table = tt "(:a|:b)"
assert_equal 5, table.eclosure(0).length
assert_equal 5, table.eclosure([0]).length
end
def test_following_states_one
- table = tt '/'
+ table = tt "/"
- assert_equal [1], table.following_states(0, '/')
- assert_equal [1], table.following_states([0], '/')
+ assert_equal [1], table.following_states(0, "/")
+ assert_equal [1], table.following_states([0], "/")
end
def test_following_states_group
- table = tt 'a|b'
+ table = tt "a|b"
states = table.eclosure 0
- assert_equal 1, table.following_states(states, 'a').length
- assert_equal 1, table.following_states(states, 'b').length
+ assert_equal 1, table.following_states(states, "a").length
+ assert_equal 1, table.following_states(states, "b").length
end
def test_following_states_multi
- table = tt 'a|a'
+ table = tt "a|a"
states = table.eclosure 0
- assert_equal 2, table.following_states(states, 'a').length
- assert_equal 0, table.following_states(states, 'b').length
+ assert_equal 2, table.following_states(states, "a").length
+ assert_equal 0, table.following_states(states, "b").length
end
def test_following_states_regexp
- table = tt 'a|:a'
+ table = tt "a|:a"
states = table.eclosure 0
- assert_equal 1, table.following_states(states, 'a').length
+ assert_equal 1, table.following_states(states, "a").length
assert_equal 1, table.following_states(states, /[^\.\/\?]+/).length
- assert_equal 0, table.following_states(states, 'b').length
+ assert_equal 0, table.following_states(states, "b").length
end
def test_alphabet
- table = tt 'a|:a'
- assert_equal [/[^\.\/\?]+/, 'a'], table.alphabet
+ table = tt "a|:a"
+ assert_equal [/[^\.\/\?]+/, "a"], table.alphabet
- table = tt 'a|a'
- assert_equal ['a'], table.alphabet
+ table = tt "a|a"
+ assert_equal ["a"], table.alphabet
end
private