#8992 closed patch
GSOC09: A few unit tests for Common::Rect
Reported by: | SF/vezoofae | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | --Other-- |
Version: | Keywords: | ||
Cc: | Game: |
Description
A bunch of tests.
A failing, but commented out assertion is included because of the the extend() function comment:
/** * Extend this rectangle so that it contains r * @param r the rectangle to extend by */
It suggests that r1.contain(r2) will be true after r1.extend(r2) is called, but this is not the case.
Ticket imported from: #2735283. Ticket imported from: patches/1097.
Attachments (1)
Change History (6)
by , 16 years ago
Attachment: | rect_unit.diff added |
---|
comment:2 by , 16 years ago
Summary: | A few unit tests for Common::Rect → GSOC09: A few unit tests for Common::Rect |
---|
comment:3 by , 16 years ago
Patch looks good. Regarding your comment on the commented out test: The Rect::contains documentation says this:
Check if the given rect is _fully_ contained inside this rectangle
Which, I guess, is supposed to explain the problematic behavior your report. I.e. a rect is not fully contained in itself by this definition... Which is confusing, I think... Need to think about that.
comment:4 by , 16 years ago
Owner: | set to |
---|---|
Status: | new → closed |
comment:5 by , 6 years ago
Component: | → --Other-- |
---|
The patch.