mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-01 17:39:54 +08:00
[test] Let tests fail on 32-bit, now that we reverted to LLVM 3.3.
This commit is contained in:
@@ -34,8 +34,6 @@ module Bacon
|
||||
|
||||
alias_method :on_64bit_it, RUBY_ARCH =~ /64/ ? :it : :xit
|
||||
|
||||
alias_method :broken_on_32bit_it, :on_64bit_it
|
||||
|
||||
alias_method :on_ios_it, defined?(UIView) ? :it : :xit
|
||||
end
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ describe 'A method accepting a 32-bit struct' do
|
||||
end
|
||||
|
||||
describe 'A method returning a 64-bit struct' do
|
||||
broken_on_32bit_it "can be called" do
|
||||
it "can be called" do
|
||||
o = TestMethod.new
|
||||
o.methodReturningCGSize.should == CGSize.new(1, 2)
|
||||
end
|
||||
@@ -28,7 +28,7 @@ describe 'A method returning a 64-bit struct' do
|
||||
end
|
||||
|
||||
describe 'A method returning a 128-bit struct' do
|
||||
broken_on_32bit_it "can be called" do
|
||||
it "can be called" do
|
||||
o = TestMethod.new
|
||||
o.methodReturningCGRect.should == CGRect.new(CGPoint.new(1, 2), CGSize.new(3, 4))
|
||||
end
|
||||
@@ -161,7 +161,7 @@ class TestPrivateMethod
|
||||
end
|
||||
|
||||
describe "A private method" do
|
||||
broken_on_32bit_it "cannot be called with #public_send" do
|
||||
it "cannot be called with #public_send" do
|
||||
o = TestPrivateMethod.new
|
||||
o.foo.should == 42
|
||||
o.send(:foo).should == 42
|
||||
|
||||
@@ -226,7 +226,7 @@ class Proc
|
||||
end
|
||||
|
||||
describe "C functions that return retained objects" do
|
||||
broken_on_32bit_it "returns an autoreleased object if the function name contains 'Create'" do
|
||||
it "returns an autoreleased object if the function name contains 'Create'" do
|
||||
lambda {
|
||||
CFStringCreateWithFormat(nil, {}, '%@', 42)
|
||||
}.should.be.autoreleased
|
||||
|
||||
@@ -23,24 +23,24 @@ describe "Objective-C predicate" do
|
||||
end
|
||||
|
||||
describe "Objective-C subscripting" do
|
||||
broken_on_32bit_it "is available in its Ruby `#[]` getter form" do
|
||||
it "is available in its Ruby `#[]` getter form" do
|
||||
obj = TestSpecialSelectors.new
|
||||
obj.should.respond_to :[]
|
||||
end
|
||||
|
||||
broken_on_32bit_it "is available in its Ruby `#[]=` setter form" do
|
||||
it "is available in its Ruby `#[]=` setter form" do
|
||||
obj = TestSpecialSelectors.new
|
||||
obj.should.respond_to :[]=
|
||||
end
|
||||
|
||||
broken_on_32bit_it "works with indexed-subscripting" do
|
||||
it "works with indexed-subscripting" do
|
||||
obj = TestSpecialSelectors.new
|
||||
o = obj[0] = 42
|
||||
obj[0].should == 42
|
||||
o.should == 42
|
||||
end
|
||||
|
||||
broken_on_32bit_it "works with keyed-subscripting" do
|
||||
it "works with keyed-subscripting" do
|
||||
obj = TestSpecialSelectors.new
|
||||
o = obj['a'] = 'foo'
|
||||
obj['a'].should == 'foo'
|
||||
|
||||
@@ -36,7 +36,7 @@ describe "Strings with multibyte characters" do
|
||||
"..€€……".index("…").should == 4
|
||||
end
|
||||
|
||||
broken_on_32bit_it "finds the most right-side index of a character" do
|
||||
it "finds the most right-side index of a character" do
|
||||
"..€€……".rindex(".").should == 1
|
||||
"..€€……".rindex("€").should == 3
|
||||
"..€€……".rindex("…").should == 5
|
||||
|
||||
@@ -65,7 +65,7 @@ describe "WeakRef" do
|
||||
end
|
||||
end
|
||||
|
||||
broken_on_32bit_it "raises a WeakRef::RefError if messaged when the reference is no longer alive" do
|
||||
it "raises a WeakRef::RefError if messaged when the reference is no longer alive" do
|
||||
autorelease_pool do
|
||||
@ref = WeakRef.new(Object.new)
|
||||
lambda { @ref.to_s }.should.not.raise
|
||||
|
||||
Reference in New Issue
Block a user