Skip to content

Commit d27c801

Browse files
author
Ary Borenszweig
committedJan 13, 2017
Fixed sizeof spec for 32 bits
1 parent bea18ec commit d27c801

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed
 

Diff for: ‎spec/compiler/codegen/sizeof_spec.cr

+9-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ describe "Code gen: sizeof" do
109109
end
110110

111111
it "can use sizeof of virtual type" do
112-
run(%(
112+
size = run(%(
113113
class Foo
114114
@x = 1
115115
end
@@ -120,10 +120,16 @@ describe "Code gen: sizeof" do
120120
121121
foo = Bar.new.as(Foo)
122122
sizeof(typeof(foo))
123-
)).to_i.should eq(8)
123+
)).to_i
124+
125+
{% if flag?(:x86_64) %}
Has a comment. Original line has a comment.
126+
size.should eq(8)
127+
{% else %}
128+
size.should eq(4)
129+
{% end %}
124130
end
125131

126-
it "can use sizeof of virtual type" do
132+
it "can use instance_sizeof of virtual type" do
127133
run(%(
128134
class Foo
129135
@x = 1

0 commit comments

Comments
 (0)
Please sign in to comment.