cloudhead-less 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +2 -0
- data/VERSION +1 -1
- data/bin/lessc +8 -2
- data/less.gemspec +8 -92
- data/lib/ext.rb +8 -7
- data/lib/less/command.rb +12 -15
- data/lib/less/engine/grammar/less.tt +7 -3
- data/lib/less/engine.rb +3 -2
- data/lib/less.rb +2 -2
- data/spec/css/css-3.css +1 -0
- data/spec/less/css-3.less +4 -0
- data/spec/less/import.less +1 -0
- metadata +23 -94
- data/lib/vendor/treetop/.gitignore +0 -7
- data/lib/vendor/treetop/LICENSE +0 -19
- data/lib/vendor/treetop/README +0 -164
- data/lib/vendor/treetop/Rakefile +0 -19
- data/lib/vendor/treetop/benchmark/seqpar.gnuplot +0 -15
- data/lib/vendor/treetop/benchmark/seqpar.treetop +0 -16
- data/lib/vendor/treetop/benchmark/seqpar_benchmark.rb +0 -107
- data/lib/vendor/treetop/bin/tt +0 -28
- data/lib/vendor/treetop/lib/treetop/bootstrap_gen_1_metagrammar.rb +0 -45
- data/lib/vendor/treetop/lib/treetop/compiler/grammar_compiler.rb +0 -42
- data/lib/vendor/treetop/lib/treetop/compiler/lexical_address_space.rb +0 -17
- data/lib/vendor/treetop/lib/treetop/compiler/metagrammar.rb +0 -3097
- data/lib/vendor/treetop/lib/treetop/compiler/metagrammar.treetop +0 -408
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb +0 -18
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/atomic_expression.rb +0 -14
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/character_class.rb +0 -24
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/choice.rb +0 -31
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/declaration_sequence.rb +0 -24
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/grammar.rb +0 -28
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/inline_module.rb +0 -27
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/nonterminal.rb +0 -13
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/optional.rb +0 -19
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/parenthesized_expression.rb +0 -9
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/parsing_expression.rb +0 -138
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/parsing_rule.rb +0 -55
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/predicate.rb +0 -45
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/repetition.rb +0 -55
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/sequence.rb +0 -68
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/terminal.rb +0 -20
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/transient_prefix.rb +0 -9
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/treetop_file.rb +0 -9
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes.rb +0 -19
- data/lib/vendor/treetop/lib/treetop/compiler/ruby_builder.rb +0 -113
- data/lib/vendor/treetop/lib/treetop/compiler.rb +0 -6
- data/lib/vendor/treetop/lib/treetop/ruby_extensions/string.rb +0 -42
- data/lib/vendor/treetop/lib/treetop/ruby_extensions.rb +0 -2
- data/lib/vendor/treetop/lib/treetop/runtime/compiled_parser.rb +0 -105
- data/lib/vendor/treetop/lib/treetop/runtime/interval_skip_list/head_node.rb +0 -15
- data/lib/vendor/treetop/lib/treetop/runtime/interval_skip_list/interval_skip_list.rb +0 -200
- data/lib/vendor/treetop/lib/treetop/runtime/interval_skip_list/node.rb +0 -164
- data/lib/vendor/treetop/lib/treetop/runtime/interval_skip_list.rb +0 -4
- data/lib/vendor/treetop/lib/treetop/runtime/syntax_node.rb +0 -72
- data/lib/vendor/treetop/lib/treetop/runtime/terminal_parse_failure.rb +0 -16
- data/lib/vendor/treetop/lib/treetop/runtime/terminal_syntax_node.rb +0 -17
- data/lib/vendor/treetop/lib/treetop/runtime.rb +0 -5
- data/lib/vendor/treetop/lib/treetop/version.rb +0 -9
- data/lib/vendor/treetop/lib/treetop.rb +0 -8
- data/lib/vendor/treetop/spec/compiler/and_predicate_spec.rb +0 -36
- data/lib/vendor/treetop/spec/compiler/anything_symbol_spec.rb +0 -44
- data/lib/vendor/treetop/spec/compiler/character_class_spec.rb +0 -182
- data/lib/vendor/treetop/spec/compiler/choice_spec.rb +0 -80
- data/lib/vendor/treetop/spec/compiler/circular_compilation_spec.rb +0 -28
- data/lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb +0 -21
- data/lib/vendor/treetop/spec/compiler/grammar_compiler_spec.rb +0 -84
- data/lib/vendor/treetop/spec/compiler/grammar_spec.rb +0 -41
- data/lib/vendor/treetop/spec/compiler/nonterminal_symbol_spec.rb +0 -40
- data/lib/vendor/treetop/spec/compiler/not_predicate_spec.rb +0 -38
- data/lib/vendor/treetop/spec/compiler/one_or_more_spec.rb +0 -35
- data/lib/vendor/treetop/spec/compiler/optional_spec.rb +0 -37
- data/lib/vendor/treetop/spec/compiler/parenthesized_expression_spec.rb +0 -19
- data/lib/vendor/treetop/spec/compiler/parsing_rule_spec.rb +0 -32
- data/lib/vendor/treetop/spec/compiler/sequence_spec.rb +0 -115
- data/lib/vendor/treetop/spec/compiler/terminal_spec.rb +0 -81
- data/lib/vendor/treetop/spec/compiler/terminal_symbol_spec.rb +0 -37
- data/lib/vendor/treetop/spec/compiler/test_grammar.treetop +0 -7
- data/lib/vendor/treetop/spec/compiler/test_grammar.tt +0 -7
- data/lib/vendor/treetop/spec/compiler/test_grammar_do.treetop +0 -7
- data/lib/vendor/treetop/spec/compiler/zero_or_more_spec.rb +0 -56
- data/lib/vendor/treetop/spec/composition/a.treetop +0 -11
- data/lib/vendor/treetop/spec/composition/b.treetop +0 -11
- data/lib/vendor/treetop/spec/composition/c.treetop +0 -10
- data/lib/vendor/treetop/spec/composition/d.treetop +0 -10
- data/lib/vendor/treetop/spec/composition/f.treetop +0 -17
- data/lib/vendor/treetop/spec/composition/grammar_composition_spec.rb +0 -40
- data/lib/vendor/treetop/spec/composition/subfolder/e_includes_c.treetop +0 -15
- data/lib/vendor/treetop/spec/ruby_extensions/string_spec.rb +0 -32
- data/lib/vendor/treetop/spec/runtime/compiled_parser_spec.rb +0 -101
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/delete_spec.rb +0 -147
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/expire_range_spec.rb +0 -349
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/insert_and_delete_node.rb +0 -385
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/insert_spec.rb +0 -660
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/interval_skip_list_spec.graffle +0 -6175
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/interval_skip_list_spec.rb +0 -58
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/palindromic_fixture.rb +0 -23
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/palindromic_fixture_spec.rb +0 -164
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/spec_helper.rb +0 -84
- data/lib/vendor/treetop/spec/runtime/syntax_node_spec.rb +0 -53
- data/lib/vendor/treetop/spec/spec_helper.rb +0 -106
- data/lib/vendor/treetop/spec/spec_suite.rb +0 -4
- data/lib/vendor/treetop/treetop.gemspec +0 -17
|
@@ -1,660 +0,0 @@
|
|
|
1
|
-
require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
|
|
2
|
-
|
|
3
|
-
describe IntervalSkipList, " when #next_node_height returns 1, 3, 2, 3, 1 in order" do
|
|
4
|
-
include IntervalSkipListSpecHelper
|
|
5
|
-
attr_reader :list, :node
|
|
6
|
-
|
|
7
|
-
before do
|
|
8
|
-
@list = IntervalSkipList.new
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
it_should_behave_like "#next_node_height is deterministic"
|
|
12
|
-
|
|
13
|
-
def expected_node_heights
|
|
14
|
-
[1, 3, 2, 3, 1]
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
describe ", when :a is inserted on 1..7" do
|
|
18
|
-
before do
|
|
19
|
-
list.insert(1..7, :a)
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
describe ", #containing" do
|
|
23
|
-
it "returns only :a from 2 through 6" do
|
|
24
|
-
(2..6).should contain_marker(:a)
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
it "returns nothing at 1 and 7" do
|
|
28
|
-
list.containing(1).should be_empty
|
|
29
|
-
list.containing(7).should be_empty
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
describe " #nodes[0]" do
|
|
34
|
-
before do
|
|
35
|
-
@node = list.nodes[0]
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
it "has a key of 1 and height of 1" do
|
|
39
|
-
node.key.should == 1
|
|
40
|
-
node.height.should == 1
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
it "has :a as its only marker at level 0" do
|
|
44
|
-
node.forward_markers[0].should have_marker(:a)
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
it "has no markers" do
|
|
48
|
-
node.markers.should be_empty
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
it "is an endpoint of only :a" do
|
|
52
|
-
node.endpoint_of.should have_marker(:a)
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
describe " #nodes[1]" do
|
|
57
|
-
before do
|
|
58
|
-
@node = list.nodes[1]
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
it "has a key of 7 and height of 3" do
|
|
62
|
-
node.key.should == 7
|
|
63
|
-
node.height.should == 3
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
it "has no forward markers at any level" do
|
|
67
|
-
node.forward_markers[0].should be_empty
|
|
68
|
-
node.forward_markers[1].should be_empty
|
|
69
|
-
node.forward_markers[2].should be_empty
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
it "has :a as its only marker" do
|
|
73
|
-
node.markers.should have_marker(:a)
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
it "is an endpoint of only :a" do
|
|
77
|
-
node.endpoint_of.should have_marker(:a)
|
|
78
|
-
end
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
describe ", and then :b is inserted on 1..5" do
|
|
82
|
-
before do
|
|
83
|
-
list.insert(1..5, :b)
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
describe ", #containing" do
|
|
87
|
-
it "returns only :a and :b from 2 through 4" do
|
|
88
|
-
(2..4).should contain_markers(:a, :b)
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
it "returns only :a from 5 through 6" do
|
|
92
|
-
(5..6).should contain_marker(:a)
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
it "returns nothing at 1 and 7" do
|
|
96
|
-
list.containing(1).should be_empty
|
|
97
|
-
list.containing(7).should be_empty
|
|
98
|
-
end
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
describe " #nodes[0]" do
|
|
102
|
-
before do
|
|
103
|
-
@node = list.nodes[0]
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
it "has a key of 1 and height of 1" do
|
|
107
|
-
node.key.should == 1
|
|
108
|
-
node.height.should == 1
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
it "has :a and :b as its only forward markers at level 0" do
|
|
112
|
-
node.forward_markers[0].should have_markers(:a, :b)
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
it "has no markers" do
|
|
116
|
-
node.markers.should be_empty
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
it "is an endpoint of only :a and :b" do
|
|
120
|
-
node.endpoint_of.should have_markers(:a, :b)
|
|
121
|
-
end
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
describe " #nodes[1]" do
|
|
125
|
-
before do
|
|
126
|
-
@node = list.nodes[1]
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
it "has a key of 5 and height of 2" do
|
|
130
|
-
node.key.should == 5
|
|
131
|
-
node.height.should == 2
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
it "has :a as its only forward marker at level 1" do
|
|
135
|
-
node.forward_markers[1].should have_marker(:a)
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
it "has no forward markers at level 0" do
|
|
139
|
-
node.forward_markers[0].should be_empty
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
it "has :a and :b as its only markers" do
|
|
143
|
-
node.markers.should have_markers(:a, :b)
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
it "is an endpoint of only :b" do
|
|
147
|
-
node.endpoint_of.should have_marker(:b)
|
|
148
|
-
end
|
|
149
|
-
end
|
|
150
|
-
|
|
151
|
-
describe " #nodes[2]" do
|
|
152
|
-
before do
|
|
153
|
-
@node = list.nodes[2]
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
it "has a key of 7 and height of 3" do
|
|
157
|
-
node.key.should == 7
|
|
158
|
-
node.height.should == 3
|
|
159
|
-
end
|
|
160
|
-
|
|
161
|
-
it "has no forward markers at any level" do
|
|
162
|
-
node.forward_markers[0].should be_empty
|
|
163
|
-
node.forward_markers[1].should be_empty
|
|
164
|
-
node.forward_markers[2].should be_empty
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
it "has :a its only marker" do
|
|
168
|
-
node.markers.should have_marker(:a)
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
it "is an endpoint of only :a" do
|
|
172
|
-
node.endpoint_of.should have_marker(:a)
|
|
173
|
-
end
|
|
174
|
-
end
|
|
175
|
-
|
|
176
|
-
describe ", and then :c is inserted on 1..3" do
|
|
177
|
-
before do
|
|
178
|
-
list.insert(1..3, :c)
|
|
179
|
-
end
|
|
180
|
-
|
|
181
|
-
describe ", #containing" do
|
|
182
|
-
it "returns only :a, :b, and :c for 2" do
|
|
183
|
-
(2..2).should contain_markers(:a, :b, :c)
|
|
184
|
-
end
|
|
185
|
-
|
|
186
|
-
it "returns only :a, :b from 3..4" do
|
|
187
|
-
(3..4).should contain_markers(:a, :b)
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
it "returns only :a from 5..6" do
|
|
191
|
-
(5..6).should contain_markers(:a)
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
it "returns nothing at 1 and 7" do
|
|
195
|
-
list.containing(1).should be_empty
|
|
196
|
-
list.containing(7).should be_empty
|
|
197
|
-
end
|
|
198
|
-
end
|
|
199
|
-
|
|
200
|
-
describe " #nodes[0]" do
|
|
201
|
-
before do
|
|
202
|
-
@node = list.nodes[0]
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
it "has a key of 1 and height of 1" do
|
|
206
|
-
node.key.should == 1
|
|
207
|
-
node.height.should == 1
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
it "has :a, :b, :c as its only forward markers at level 0" do
|
|
211
|
-
node.forward_markers[0].should have_markers(:a, :b, :c)
|
|
212
|
-
end
|
|
213
|
-
|
|
214
|
-
it "has no markers" do
|
|
215
|
-
node.markers.should be_empty
|
|
216
|
-
end
|
|
217
|
-
|
|
218
|
-
it "is an endpoint of only :a, :b, :c" do
|
|
219
|
-
node.endpoint_of.should have_markers(:a, :b, :c)
|
|
220
|
-
end
|
|
221
|
-
end
|
|
222
|
-
|
|
223
|
-
describe " #nodes[1]" do
|
|
224
|
-
before do
|
|
225
|
-
@node = list.nodes[1]
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
it "has a key of 3 and height of 3" do
|
|
229
|
-
node.key.should == 3
|
|
230
|
-
node.height.should == 3
|
|
231
|
-
end
|
|
232
|
-
|
|
233
|
-
it "has :a as its only forward marker at level 2" do
|
|
234
|
-
node.forward_markers[2].should have_marker(:a)
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
it "has :b as its only forward marker at level 1" do
|
|
238
|
-
node.forward_markers[1].should have_marker(:b)
|
|
239
|
-
end
|
|
240
|
-
|
|
241
|
-
it "has no forward markers at level 0" do
|
|
242
|
-
node.forward_markers[0].should be_empty
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
it "has :a, :b, and :c as its only markers" do
|
|
246
|
-
node.markers.should have_markers(:a, :b, :c)
|
|
247
|
-
end
|
|
248
|
-
|
|
249
|
-
it "is an endpoint of only :c" do
|
|
250
|
-
node.endpoint_of.should have_marker(:c)
|
|
251
|
-
end
|
|
252
|
-
end
|
|
253
|
-
|
|
254
|
-
describe " #nodes[2]" do
|
|
255
|
-
before do
|
|
256
|
-
@node = list.nodes[2]
|
|
257
|
-
end
|
|
258
|
-
|
|
259
|
-
it "has a key of 5 and height of 2" do
|
|
260
|
-
node.key.should == 5
|
|
261
|
-
node.height.should == 2
|
|
262
|
-
end
|
|
263
|
-
|
|
264
|
-
it "has no forward markers at any level" do
|
|
265
|
-
node.forward_markers[0].should be_empty
|
|
266
|
-
node.forward_markers[1].should be_empty
|
|
267
|
-
end
|
|
268
|
-
|
|
269
|
-
it "has :b as its only markers" do
|
|
270
|
-
node.markers.should have_marker(:b)
|
|
271
|
-
end
|
|
272
|
-
|
|
273
|
-
it "is an endpoint of only :b" do
|
|
274
|
-
node.endpoint_of.should have_marker(:b)
|
|
275
|
-
end
|
|
276
|
-
end
|
|
277
|
-
|
|
278
|
-
describe " #nodes[3]" do
|
|
279
|
-
before do
|
|
280
|
-
@node = list.nodes[3]
|
|
281
|
-
end
|
|
282
|
-
|
|
283
|
-
it "has a key of 7 and height of 3" do
|
|
284
|
-
node.key.should == 7
|
|
285
|
-
node.height.should == 3
|
|
286
|
-
end
|
|
287
|
-
|
|
288
|
-
it "has no forward markers at any level" do
|
|
289
|
-
node.forward_markers[0].should be_empty
|
|
290
|
-
node.forward_markers[1].should be_empty
|
|
291
|
-
node.forward_markers[2].should be_empty
|
|
292
|
-
end
|
|
293
|
-
|
|
294
|
-
it "has :a as its only marker" do
|
|
295
|
-
node.markers.should have_marker(:a)
|
|
296
|
-
end
|
|
297
|
-
|
|
298
|
-
it "is an endpoint of only :a" do
|
|
299
|
-
node.endpoint_of.should have_marker(:a)
|
|
300
|
-
end
|
|
301
|
-
end
|
|
302
|
-
|
|
303
|
-
describe ", and then :d is inserted on 1..9" do
|
|
304
|
-
before do
|
|
305
|
-
list.insert(1..9, :d)
|
|
306
|
-
end
|
|
307
|
-
|
|
308
|
-
describe ", #containing" do
|
|
309
|
-
it "returns only :a, :b, :c, and :d for 2" do
|
|
310
|
-
(2..2).should contain_markers(:a, :b, :c, :d)
|
|
311
|
-
end
|
|
312
|
-
|
|
313
|
-
it "returns only :a, :b from 3..4" do
|
|
314
|
-
(3..4).should contain_markers(:a, :b, :d)
|
|
315
|
-
end
|
|
316
|
-
|
|
317
|
-
it "returns only :a from 5..6" do
|
|
318
|
-
(5..6).should contain_markers(:a, :d)
|
|
319
|
-
end
|
|
320
|
-
|
|
321
|
-
it "returns only :a from 7..8" do
|
|
322
|
-
(7..8).should contain_markers(:d)
|
|
323
|
-
end
|
|
324
|
-
|
|
325
|
-
it "returns nothing at 1 and 9" do
|
|
326
|
-
list.containing(1).should be_empty
|
|
327
|
-
list.containing(9).should be_empty
|
|
328
|
-
end
|
|
329
|
-
|
|
330
|
-
it "returns nothing for -1, 0, and 10" do
|
|
331
|
-
list.containing(-1).should be_empty
|
|
332
|
-
list.containing(0).should be_empty
|
|
333
|
-
list.containing(10).should be_empty
|
|
334
|
-
end
|
|
335
|
-
end
|
|
336
|
-
|
|
337
|
-
describe " #nodes[0]" do
|
|
338
|
-
before do
|
|
339
|
-
@node = list.nodes[0]
|
|
340
|
-
end
|
|
341
|
-
|
|
342
|
-
it "has a key of 1 and height of 1" do
|
|
343
|
-
node.key.should == 1
|
|
344
|
-
node.height.should == 1
|
|
345
|
-
end
|
|
346
|
-
|
|
347
|
-
it "has :a, :b, :c, :d as its only forward markers at level 0" do
|
|
348
|
-
node.forward_markers[0].should have_markers(:a, :b, :c, :d)
|
|
349
|
-
end
|
|
350
|
-
|
|
351
|
-
it "has no markers" do
|
|
352
|
-
node.markers.should be_empty
|
|
353
|
-
end
|
|
354
|
-
|
|
355
|
-
it "is an endpoint of only :a, :b, :c, and :d" do
|
|
356
|
-
node.endpoint_of.should have_markers(:a, :b, :c, :d)
|
|
357
|
-
end
|
|
358
|
-
end
|
|
359
|
-
|
|
360
|
-
describe " #nodes[1]" do
|
|
361
|
-
before do
|
|
362
|
-
@node = list.nodes[1]
|
|
363
|
-
end
|
|
364
|
-
|
|
365
|
-
it "has a key of 3 and height of 3" do
|
|
366
|
-
node.key.should == 3
|
|
367
|
-
node.height.should == 3
|
|
368
|
-
end
|
|
369
|
-
|
|
370
|
-
it "has :a and :d as its only forward markers at level 2" do
|
|
371
|
-
node.forward_markers[2].should have_markers(:a, :d)
|
|
372
|
-
end
|
|
373
|
-
|
|
374
|
-
it "has :b as its only marker at level 1" do
|
|
375
|
-
node.forward_markers[1].should have_marker(:b)
|
|
376
|
-
end
|
|
377
|
-
|
|
378
|
-
it "has no forward markers at level 0" do
|
|
379
|
-
node.forward_markers[0].should be_empty
|
|
380
|
-
end
|
|
381
|
-
|
|
382
|
-
it "has :a, :b, :c, :d as its only markers" do
|
|
383
|
-
node.markers.should have_markers(:a, :b, :c, :d)
|
|
384
|
-
end
|
|
385
|
-
|
|
386
|
-
it "is an endpoint of only :c" do
|
|
387
|
-
node.endpoint_of.should have_marker(:c)
|
|
388
|
-
end
|
|
389
|
-
end
|
|
390
|
-
|
|
391
|
-
describe " #nodes[2]" do
|
|
392
|
-
before do
|
|
393
|
-
@node = list.nodes[2]
|
|
394
|
-
end
|
|
395
|
-
|
|
396
|
-
it "has a key of 5 and height of 2" do
|
|
397
|
-
node.key.should == 5
|
|
398
|
-
node.height.should == 2
|
|
399
|
-
end
|
|
400
|
-
|
|
401
|
-
it "has no markers on any level" do
|
|
402
|
-
node.forward_markers[0].should be_empty
|
|
403
|
-
node.forward_markers[1].should be_empty
|
|
404
|
-
end
|
|
405
|
-
|
|
406
|
-
it "has :b as its only marker" do
|
|
407
|
-
node.markers.should have_marker(:b)
|
|
408
|
-
end
|
|
409
|
-
|
|
410
|
-
it "is an endpoint of only :b" do
|
|
411
|
-
node.endpoint_of.should have_marker(:b)
|
|
412
|
-
end
|
|
413
|
-
end
|
|
414
|
-
|
|
415
|
-
describe " #nodes[3]" do
|
|
416
|
-
before do
|
|
417
|
-
@node = list.nodes[3]
|
|
418
|
-
end
|
|
419
|
-
|
|
420
|
-
it "has a key of 7 and height of 3" do
|
|
421
|
-
node.key.should == 7
|
|
422
|
-
node.height.should == 3
|
|
423
|
-
end
|
|
424
|
-
|
|
425
|
-
it "has :d as its only marker at level 0" do
|
|
426
|
-
node.forward_markers[0].should have_marker(:d)
|
|
427
|
-
end
|
|
428
|
-
|
|
429
|
-
it "has no forward markers at levels 1 and 2" do
|
|
430
|
-
node.forward_markers[1].should be_empty
|
|
431
|
-
node.forward_markers[2].should be_empty
|
|
432
|
-
end
|
|
433
|
-
|
|
434
|
-
it "has :a, :d as its only markers" do
|
|
435
|
-
node.markers.should have_markers(:a, :d)
|
|
436
|
-
end
|
|
437
|
-
|
|
438
|
-
it "is an endpoint of only :a" do
|
|
439
|
-
node.endpoint_of.should have_marker(:a)
|
|
440
|
-
end
|
|
441
|
-
end
|
|
442
|
-
|
|
443
|
-
describe " #nodes[4]" do
|
|
444
|
-
before do
|
|
445
|
-
@node = list.nodes[4]
|
|
446
|
-
end
|
|
447
|
-
|
|
448
|
-
it "has a key of 9 and height of 1" do
|
|
449
|
-
node.key.should == 9
|
|
450
|
-
node.height.should == 1
|
|
451
|
-
end
|
|
452
|
-
|
|
453
|
-
it "has no forward markers at level 0" do
|
|
454
|
-
node.forward_markers[0].should be_empty
|
|
455
|
-
end
|
|
456
|
-
|
|
457
|
-
it "has :d as its only marker" do
|
|
458
|
-
node.markers.should have_marker(:d)
|
|
459
|
-
end
|
|
460
|
-
|
|
461
|
-
it "is an endpoint of only :d" do
|
|
462
|
-
node.endpoint_of.should have_marker(:d)
|
|
463
|
-
end
|
|
464
|
-
end
|
|
465
|
-
|
|
466
|
-
describe ", and then :d is deleted" do
|
|
467
|
-
before do
|
|
468
|
-
list.delete(:d)
|
|
469
|
-
end
|
|
470
|
-
|
|
471
|
-
it "has only 4 nodes" do
|
|
472
|
-
list.nodes.size.should == 4
|
|
473
|
-
end
|
|
474
|
-
|
|
475
|
-
describe " #nodes[0]" do
|
|
476
|
-
before do
|
|
477
|
-
@node = list.nodes[0]
|
|
478
|
-
end
|
|
479
|
-
|
|
480
|
-
it "has a key of 1 and height of 1" do
|
|
481
|
-
node.key.should == 1
|
|
482
|
-
node.height.should == 1
|
|
483
|
-
end
|
|
484
|
-
|
|
485
|
-
it "has :a, :b, and :c as its only forward markers at level 0" do
|
|
486
|
-
node.forward_markers[0].should have_markers(:a, :b, :c)
|
|
487
|
-
end
|
|
488
|
-
end
|
|
489
|
-
|
|
490
|
-
describe " #nodes[1]" do
|
|
491
|
-
before do
|
|
492
|
-
@node = list.nodes[1]
|
|
493
|
-
end
|
|
494
|
-
|
|
495
|
-
it "has a key of 3 and height of 3" do
|
|
496
|
-
node.key.should == 3
|
|
497
|
-
node.height.should == 3
|
|
498
|
-
end
|
|
499
|
-
|
|
500
|
-
it "has :a as its only forward marker at level 2" do
|
|
501
|
-
node.forward_markers[2].should have_marker(:a)
|
|
502
|
-
end
|
|
503
|
-
|
|
504
|
-
it "has :b as its only forward marker at level 1" do
|
|
505
|
-
node.forward_markers[1].should have_marker(:b)
|
|
506
|
-
end
|
|
507
|
-
|
|
508
|
-
it "has no forward markers at level 0" do
|
|
509
|
-
node.forward_markers[0].should be_empty
|
|
510
|
-
end
|
|
511
|
-
|
|
512
|
-
it "has :a, :b, and :c as its only markers" do
|
|
513
|
-
node.markers.should have_markers(:a, :b, :c)
|
|
514
|
-
end
|
|
515
|
-
|
|
516
|
-
it "is the endpoint of only :c" do
|
|
517
|
-
node.endpoint_of.should have_marker(:c)
|
|
518
|
-
end
|
|
519
|
-
end
|
|
520
|
-
|
|
521
|
-
describe " #nodes[2]" do
|
|
522
|
-
before do
|
|
523
|
-
@node = list.nodes[2]
|
|
524
|
-
end
|
|
525
|
-
|
|
526
|
-
it "has a key of 5 and height of 2" do
|
|
527
|
-
node.key.should == 5
|
|
528
|
-
node.height.should == 2
|
|
529
|
-
end
|
|
530
|
-
|
|
531
|
-
it "has no forward markers at any level" do
|
|
532
|
-
node.forward_markers[0].should be_empty
|
|
533
|
-
node.forward_markers[1].should be_empty
|
|
534
|
-
end
|
|
535
|
-
|
|
536
|
-
it "has :b as its only marker" do
|
|
537
|
-
node.markers.should have_marker(:b)
|
|
538
|
-
end
|
|
539
|
-
|
|
540
|
-
it "is the endpoint of only :b" do
|
|
541
|
-
node.endpoint_of.should have_marker(:b)
|
|
542
|
-
end
|
|
543
|
-
end
|
|
544
|
-
|
|
545
|
-
describe " #nodes[3]" do
|
|
546
|
-
before do
|
|
547
|
-
@node = list.nodes[3]
|
|
548
|
-
end
|
|
549
|
-
|
|
550
|
-
it "has a key of 7 and height of 3" do
|
|
551
|
-
node.key.should == 7
|
|
552
|
-
node.height.should == 3
|
|
553
|
-
end
|
|
554
|
-
|
|
555
|
-
it "has no forward markers at any level" do
|
|
556
|
-
node.forward_markers[0].should be_empty
|
|
557
|
-
node.forward_markers[1].should be_empty
|
|
558
|
-
node.forward_markers[2].should be_empty
|
|
559
|
-
end
|
|
560
|
-
|
|
561
|
-
it "has :a as its only marker" do
|
|
562
|
-
node.markers.should have_marker(:a)
|
|
563
|
-
end
|
|
564
|
-
|
|
565
|
-
it "is the endpoint of only :a" do
|
|
566
|
-
node.endpoint_of.should have_marker(:a)
|
|
567
|
-
end
|
|
568
|
-
end
|
|
569
|
-
|
|
570
|
-
describe ", and then :c is deleted" do
|
|
571
|
-
before do
|
|
572
|
-
list.delete(:c)
|
|
573
|
-
end
|
|
574
|
-
|
|
575
|
-
it "has only 3 nodes" do
|
|
576
|
-
list.nodes.size.should == 3
|
|
577
|
-
end
|
|
578
|
-
|
|
579
|
-
describe " #nodes[0]" do
|
|
580
|
-
before do
|
|
581
|
-
@node = list.nodes[0]
|
|
582
|
-
end
|
|
583
|
-
|
|
584
|
-
it "has a key of 1 and height of 1" do
|
|
585
|
-
node.key.should == 1
|
|
586
|
-
node.height.should == 1
|
|
587
|
-
end
|
|
588
|
-
|
|
589
|
-
it "has :a and :b as its only forward markers at level 0" do
|
|
590
|
-
node.forward_markers[0].should have_markers(:a, :b)
|
|
591
|
-
end
|
|
592
|
-
|
|
593
|
-
it "has no markers" do
|
|
594
|
-
node.markers.should be_empty
|
|
595
|
-
end
|
|
596
|
-
|
|
597
|
-
it "is an endpoint of only :a and :b" do
|
|
598
|
-
node.endpoint_of.should have_markers(:a, :b)
|
|
599
|
-
end
|
|
600
|
-
end
|
|
601
|
-
|
|
602
|
-
describe " #nodes[1]" do
|
|
603
|
-
before do
|
|
604
|
-
@node = list.nodes[1]
|
|
605
|
-
end
|
|
606
|
-
|
|
607
|
-
it "has a key of 5 and height of 2" do
|
|
608
|
-
node.key.should == 5
|
|
609
|
-
node.height.should == 2
|
|
610
|
-
end
|
|
611
|
-
|
|
612
|
-
it "has :a as its only forward marker at level 1" do
|
|
613
|
-
node.forward_markers[1].should have_marker(:a)
|
|
614
|
-
end
|
|
615
|
-
|
|
616
|
-
it "has no forward markers at level 0" do
|
|
617
|
-
node.forward_markers[0].should be_empty
|
|
618
|
-
end
|
|
619
|
-
|
|
620
|
-
it "has :a and :b as its only markers" do
|
|
621
|
-
node.markers.should have_markers(:a, :b)
|
|
622
|
-
end
|
|
623
|
-
|
|
624
|
-
it "is an endpoint of only :b" do
|
|
625
|
-
node.endpoint_of.should have_marker(:b)
|
|
626
|
-
end
|
|
627
|
-
end
|
|
628
|
-
|
|
629
|
-
describe " #nodes[2]" do
|
|
630
|
-
before do
|
|
631
|
-
@node = list.nodes[2]
|
|
632
|
-
end
|
|
633
|
-
|
|
634
|
-
it "has a key of 7 and height of 3" do
|
|
635
|
-
node.key.should == 7
|
|
636
|
-
node.height.should == 3
|
|
637
|
-
end
|
|
638
|
-
|
|
639
|
-
it "has no forward markers at any level" do
|
|
640
|
-
node.forward_markers[0].should be_empty
|
|
641
|
-
node.forward_markers[1].should be_empty
|
|
642
|
-
node.forward_markers[2].should be_empty
|
|
643
|
-
end
|
|
644
|
-
|
|
645
|
-
it "has :a its only marker" do
|
|
646
|
-
node.markers.should have_marker(:a)
|
|
647
|
-
end
|
|
648
|
-
|
|
649
|
-
it "is an endpoint of only :a" do
|
|
650
|
-
node.endpoint_of.should have_marker(:a)
|
|
651
|
-
end
|
|
652
|
-
end
|
|
653
|
-
end
|
|
654
|
-
end
|
|
655
|
-
end
|
|
656
|
-
end
|
|
657
|
-
end
|
|
658
|
-
end
|
|
659
|
-
end
|
|
660
|
-
|