parser 2.0.0.beta6 → 2.0.0.beta7

Sign up to get free protection for your applications and to get access to all the features.
@@ -67,24 +67,24 @@ class TestSourceBuffer < Minitest::Test
67
67
  def test_line
68
68
  @buffer.source = "1\nfoo\nbar"
69
69
 
70
- assert_equal "1", @buffer.source_line(1)
71
- assert_equal "foo", @buffer.source_line(2)
70
+ assert_equal '1', @buffer.source_line(1)
71
+ assert_equal 'foo', @buffer.source_line(2)
72
72
  end
73
73
 
74
74
  def test_line_mutate
75
75
  @buffer.source = "1\nfoo\nbar"
76
76
 
77
- assert_equal "1", @buffer.source_line(1)
77
+ assert_equal '1', @buffer.source_line(1)
78
78
 
79
79
  @buffer.source_line(1)[0] = '2'
80
- assert_equal "1", @buffer.source_line(1)
80
+ assert_equal '1', @buffer.source_line(1)
81
81
  end
82
82
 
83
83
  def test_line_mapped
84
84
  @buffer = Parser::Source::Buffer.new('(string)', 5)
85
85
  @buffer.source = "1\nfoo\nbar"
86
86
 
87
- assert_equal "1", @buffer.source_line(5)
88
- assert_equal "foo", @buffer.source_line(6)
87
+ assert_equal '1', @buffer.source_line(5)
88
+ assert_equal 'foo', @buffer.source_line(6)
89
89
  end
90
90
  end
@@ -34,7 +34,7 @@ class TestSourceRange < Minitest::Test
34
34
 
35
35
  def test_source_line
36
36
  sr = Parser::Source::Range.new(@buf, 7, 8)
37
- assert_equal "baz", sr.source_line
37
+ assert_equal 'baz', sr.source_line
38
38
  end
39
39
 
40
40
  def test_columns
@@ -58,7 +58,7 @@ class TestSourceRange < Minitest::Test
58
58
 
59
59
  def test_source
60
60
  sr = Parser::Source::Range.new(@buf, 0, 3)
61
- assert_equal "foo", sr.source
61
+ assert_equal 'foo', sr.source
62
62
 
63
63
  sr_multi = Parser::Source::Range.new(@buf, 0, 10)
64
64
  assert_equal "foobar\nbaz", sr_multi.source
@@ -72,6 +72,6 @@ class TestSourceRange < Minitest::Test
72
72
 
73
73
  def test_to_s
74
74
  sr = Parser::Source::Range.new(@buf, 8, 9)
75
- assert_equal "(string):2:2", sr.to_s
75
+ assert_equal '(string):2:2', sr.to_s
76
76
  end
77
77
  end
@@ -69,7 +69,7 @@ class TestSourceRewriter < Minitest::Test
69
69
  assert_equal 2, diagnostics.count
70
70
 
71
71
  assert_equal :error, diagnostics.first.level
72
- assert_equal "cannot remove 1 character(s)",
72
+ assert_equal 'cannot remove 1 character(s)',
73
73
  diagnostics.first.message
74
74
  assert_equal range(3, 1), diagnostics.first.location
75
75
 
@@ -15,30 +15,30 @@ class TestSourceRewriterAction < Minitest::Test
15
15
  end
16
16
 
17
17
  def test_accessors
18
- action = action(range(1, 10), "foo")
18
+ action = action(range(1, 10), 'foo')
19
19
 
20
20
  assert action.frozen?
21
21
  assert_equal range(1, 10), action.range
22
- assert_equal "foo", action.replacement
22
+ assert_equal 'foo', action.replacement
23
23
  end
24
24
 
25
25
  def test_to_s_replace
26
- action = action(range(3, 1), "foo")
26
+ action = action(range(3, 1), 'foo')
27
27
  assert_equal "replace 1 character(s) with \"foo\"", action.to_s
28
28
  end
29
29
 
30
30
  def test_to_s_insert
31
- action = action(range(3, 0), "foo")
31
+ action = action(range(3, 0), 'foo')
32
32
  assert_equal "insert \"foo\"", action.to_s
33
33
  end
34
34
 
35
35
  def test_to_s_remove
36
- action = action(range(3, 2), "")
37
- assert_equal "remove 2 character(s)", action.to_s
36
+ action = action(range(3, 2), '')
37
+ assert_equal 'remove 2 character(s)', action.to_s
38
38
  end
39
39
 
40
40
  def test_to_s_nop
41
- action = action(range(3, 0), "")
42
- assert_equal "do nothing", action.to_s
41
+ action = action(range(3, 0), '')
42
+ assert_equal 'do nothing', action.to_s
43
43
  end
44
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta6
4
+ version: 2.0.0.beta7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Zotov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-17 00:00:00.000000000 Z
11
+ date: 2013-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast