-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
Fixes #34.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
require "spec" | ||
require "../src/graphics" | ||
|
||
describe SF::View do | ||
describe "#dup" do | ||
it "works from a Reference (#34)" do | ||
w = SF::RenderTexture.new | ||
w.view = SF::View.new(SF.float_rect(1, 2, 3, 4)) | ||
v = w.view.dup | ||
v.size.should eq SF.vector2(3, 4) | ||
end | ||
|
||
it "works as a class member (#34)" do | ||
v = ViewDupTest.new.view_dup | ||
v.size.should eq SF.vector2(3, 4) | ||
end | ||
end | ||
end | ||
|
||
class ViewDupTest | ||
def initialize | ||
@view = SF::View.new(SF.float_rect(1, 2, 3, 4)) | ||
end | ||
|
||
def view_dup | ||
@view.dup | ||
end | ||
end | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.