Skip to content

Commit 357e9bf

Browse files
committed
Fix trailing whitespace in Truffle specs
1 parent 0122f09 commit 357e9bf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+621
-623
lines changed

spec/truffle/array/new_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def capacity(ary)
3333

3434
it "creates arrays with the requested capacity with a value block" do
3535
a = Array.new(17) { 1 }
36-
capacity(a).should == 17
36+
capacity(a).should == 17
3737
end
3838
end
39-

spec/truffle/array/pack_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def check_pack_equal_bytes(expected, actual)
2222
it "should pack expressions with loops" do
2323
([1] * 1024).pack('l' * 1024).sum.should == 1024
2424
end
25-
25+
2626
it "should be able to pack a tarball entry" do
2727
ary = ["metadata.gz", "0000444", "0000000", "0000000", "00000001244", "00000000044", " ", " ", "0", nil,
2828
"ustar", "00", "wheel", "wheel", "0000000", "0000000", ""]

spec/truffle/binding/of_caller_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. This
22
# code is released under a tri EPL/GPL/LGPL license. You can use it,
33
# redistribute it and/or modify it under the terms of the:
4-
#
4+
#
55
# Eclipse Public License version 1.0, or
66
# GNU General Public License version 2, or
77
# GNU Lesser General Public License version 2.1.
@@ -16,22 +16,22 @@ def binding_of_caller
1616

1717
#it "returns nil if there is no caller"
1818
#end
19-
19+
2020
it "returns a Binding" do
2121
binding_of_caller.should be_kind_of(Binding)
2222
end
23-
23+
2424
it "gives read access to local variables at the call site" do
2525
x = 14
2626
binding_of_caller.local_variable_get(:x).should == 14
2727
end
28-
28+
2929
it "gives write access to local variables at the call site" do
3030
x = 2
3131
binding_of_caller.local_variable_set(:x, 14)
3232
x.should == 14
3333
end
34-
34+
3535
it "works through #send" do
3636
x = 14
3737
Truffle::Binding.send(:of_caller).local_variable_get(:x).should == 14

spec/truffle/boot/source_of_caller_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. This
22
# code is released under a tri EPL/GPL/LGPL license. You can use it,
33
# redistribute it and/or modify it under the terms of the:
4-
#
4+
#
55
# Eclipse Public License version 1.0, or
66
# GNU General Public License version 2, or
77
# GNU Lesser General Public License version 2.1.
@@ -16,15 +16,15 @@ def source_of_caller
1616

1717
#it "returns nil if there is no caller"
1818
#end
19-
19+
2020
it "returns a String" do
2121
source_of_caller.should be_kind_of(String)
2222
end
23-
23+
2424
it "returns the name of the file at the call site" do
2525
source_of_caller.should == __FILE__
2626
end
27-
27+
2828
it "works through #send" do
2929
x = 14
3030
Truffle::Boot.send(:source_of_caller).should == __FILE__

spec/truffle/debug_sepc.rb

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved. This
22
# code is released under a tri EPL/GPL/LGPL license. You can use it,
33
# redistribute it and/or modify it under the terms of the:
4-
#
4+
#
55
# Eclipse Public License version 1.0, or
66
# GNU General Public License version 2, or
77
# GNU Lesser General Public License version 2.1.
@@ -11,56 +11,56 @@
1111
require 'digest'
1212

1313
module TruffleDebugSpecFixtures
14-
14+
1515
def self.subject(a, b)
1616
c = a + b
1717
c * 2
1818
end
19-
19+
2020
ADD_LINE = 16
2121
MUL_LINE = 17
22-
22+
2323
end
2424

2525
describe "Truffle::Debug" do
26-
26+
2727
it "can add and remove breakpoints" do
2828
breaks = []
29-
29+
3030
breakpoint = Truffle::Debug.break __FILE__, TruffleDebugSpecFixtures::ADD_LINE do |binding|
3131
breaks << [:break]
3232
end
33-
33+
3434
TruffleDebuggerSpecFixtures.subject(14, 2)
3535
TruffleDebuggerSpecFixtures.subject(16, 4)
36-
36+
3737
breakpoint.remove
38-
38+
3939
TruffleDebuggerSpecFixtures.subject(18, 9)
40-
40+
4141
breaks.should == [:break]
4242
end
43-
43+
4444
it "can observe local variables in a breakpoint" do
4545
breaks = []
46-
46+
4747
breakpoint = Truffle::Debug.break __FILE__, TruffleDebugSpecFixtures::ADD_LINE do |binding|
4848
breaks << [binding.local_variable_get(:a), binding.local_variable_get(:b)]
4949
end
50-
50+
5151
breakpoint = Truffle::Debug.break __FILE__, TruffleDebugSpecFixtures::MUL_LINE do |binding|
5252
breaks << [binding.local_variable_get(:c)]
5353
end
54-
54+
5555
TruffleDebugSpecFixtures.subject(14, 2)
5656
TruffleDebugSpecFixtures.subject(16, 4)
57-
57+
5858
breakpoint.remove
59-
59+
6060
TruffleDebugSpecFixtures.subject(18, 9)
61-
61+
6262
breaks.should == [14, 2, 14 + 2, 16, 4, 16 + 4]
6363
end
6464

65-
65+
6666
end

spec/truffle/digest_spec.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved. This
22
# code is released under a tri EPL/GPL/LGPL license. You can use it,
33
# redistribute it and/or modify it under the terms of the:
4-
#
4+
#
55
# Eclipse Public License version 1.0, or
66
# GNU General Public License version 2, or
77
# GNU Lesser General Public License version 2.1.
@@ -11,43 +11,43 @@
1111
require 'digest'
1212

1313
describe "digest updating" do
14-
14+
1515
# These tests are here as a convienent way to check we're iterating over ropes correctly when doing IO
16-
16+
1717
it "works on leaf ropes" do
1818
Digest::MD5.hexdigest('foo').should == 'acbd18db4cc2f85cedef654fccc4a4d8'
1919
end
20-
20+
2121
it "works on concat ropes" do
2222
Digest::MD5.hexdigest('foo' + 'bar').should == '3858f62230ac3c915f300c664312c63f'
2323
end
24-
24+
2525
it "works on substring ropes" do
2626
Digest::MD5.hexdigest('foo'[1...-1]).should == 'd95679752134a2d9eb61dbd7b91c4bcc'
2727
end
28-
28+
2929
it "works on substring ropes that cross a concat rope" do
3030
Digest::MD5.hexdigest(('foo' + 'bar')[2...-2]).should == '99faee4e1a331a7595932b7c18f9f5f6'
3131
end
32-
32+
3333
it "works on substring ropes that only use the left of a concat rope" do
3434
Digest::MD5.hexdigest(('foo' + 'bar')[1...2]).should == 'd95679752134a2d9eb61dbd7b91c4bcc'
3535
end
36-
36+
3737
it "works on substring ropes that only use the right of a concat rope" do
3838
Digest::MD5.hexdigest(('foo' + 'bar')[4...5]).should == '0cc175b9c0f1b6a831c399e269772661'
3939
end
40-
40+
4141
it "works on repeating ropes that only use the first repetition" do
4242
Digest::MD5.hexdigest(('foo' * 2)[1...2]).should == 'd95679752134a2d9eb61dbd7b91c4bcc'
4343
end
44-
44+
4545
it "works on repeating ropes that only use the second repetition" do
4646
Digest::MD5.hexdigest(('foo' * 2)[4...5]).should == 'd95679752134a2d9eb61dbd7b91c4bcc'
4747
end
48-
48+
4949
it "works on repeating ropes that cross two repetitions" do
5050
Digest::MD5.hexdigest(('foo' * 2)[2...-2]).should == '8bf8854bebe108183caeb845c7676ae4'
5151
end
52-
52+
5353
end

spec/truffle/gc/time_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. This
22
# code is released under a tri EPL/GPL/LGPL license. You can use it,
33
# redistribute it and/or modify it under the terms of the:
4-
#
4+
#
55
# Eclipse Public License version 1.0, or
66
# GNU General Public License version 2, or
77
# GNU Lesser General Public License version 2.1.
@@ -13,7 +13,7 @@
1313
it "returns an Integer" do
1414
GC.time.should be_kind_of(Integer)
1515
end
16-
16+
1717
it "increases as collections are run" do
1818
time_before = GC.time
1919
i = 0

spec/truffle/graal/assert_constant_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. This
22
# code is released under a tri EPL/GPL/LGPL license. You can use it,
33
# redistribute it and/or modify it under the terms of the:
4-
#
4+
#
55
# Eclipse Public License version 1.0, or
66
# GNU General Public License version 2, or
77
# GNU Lesser General Public License version 2.1.
88

99
require_relative '../../ruby/spec_helper'
1010

1111
describe "Truffle::Graal.assert_constant" do
12-
12+
1313
it "raises a RuntimeError when called dynamically" do
1414
lambda{ Truffle::Graal.send(:assert_constant, 14 + 2) }.should raise_error(RuntimeError)
1515
end

spec/truffle/graal/assert_not_compiled_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. This
22
# code is released under a tri EPL/GPL/LGPL license. You can use it,
33
# redistribute it and/or modify it under the terms of the:
4-
#
4+
#
55
# Eclipse Public License version 1.0, or
66
# GNU General Public License version 2, or
77
# GNU Lesser General Public License version 2.1.
88

99
require_relative '../../ruby/spec_helper'
1010

1111
describe "Truffle::Graal.assert_not_compiled" do
12-
12+
1313
it "raises a RuntimeError when called dynamically" do
1414
lambda{ Truffle::Graal.send(:assert_not_compiled) }.should raise_error(RuntimeError)
1515
end

spec/truffle/identity_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
it "is not defined" do
8585
defined?(Rubinius).should be_nil
8686
end
87-
87+
8888
end
8989

9090
describe "the RubySL module" do
@@ -97,7 +97,7 @@
9797
it "is not defined" do
9898
defined?(RubySL).should be_nil
9999
end
100-
100+
101101
end
102102

103103
end

0 commit comments

Comments
 (0)