Sha256: 48edf7947f989d0b81de2e6d544c32ff368809617a16cd339a21c5f1cbef5dd2
Contents?: true
Size: 904 Bytes
Versions: 5
Compression:
Stored size: 904 Bytes
Contents
describe Joybox::Cocos2D::Macros do describe :jbpNeg do it 'should returns opposite of point' do subject = Joybox::Cocos2D::Macros.new.jbpNeg(CGPointMake(1, 2)) subject.x.should.equal(-1) subject.y.should.equal(-2) end end describe :jbpAdd do it 'should sum of two points' do subject = Joybox::Cocos2D::Macros.new.jbpAdd(CGPointMake(1, 2), CGPointMake(3, 4)) subject.x.should.equal(4) subject.y.should.equal(6) end end describe :jbpCompOp do it 'should run a math operation function on each point component' do subject = Joybox::Cocos2D::Macros.new.jbpCompOp(CGPointMake(1, 2)) {|n| n * 10 } subject.x.should.equal(10) subject.y.should.equal(20) end end describe :jbpLineIntersect do # TODO end describe :jbpSegmentIntersect do # TODO end describe :jbpIntersectPoint do # TODO end end
Version data entries
5 entries across 5 versions & 1 rubygems