Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWrite parse tests for linear gradients #13837
Closed
Comments
|
Please make a comment here if you intend to work on this issue. Thank you! |
|
I'd like to give this a go :) |
|
@AVGP Please do! Ask questions here if anything is unclear! |
|
What's up with Travis? Is this DNS-DDoS fallout? |
|
Yeah, probably because of DNS attack. Also highfive is not working properly. |
bors-servo
added a commit
that referenced
this issue
Oct 30, 2016
Adds parsing test for linear-gradient <!-- Please describe your changes on the following line: --> Tests if `linear-gradient` is correctly parsed without `<side-or-corner>` as well as with `to left` and `to right`. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13837 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13886) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have parse tests for radial gradients' parsing. Linear gradients are simpler than radial ones and probably require lesser tests.
To add parse tests, you can add a new test function to
tests/unit/style/parsing/image.rsand withassert_roundtrip_with_context!macro, compare the left gradient with right parsed ones. Implementation is pretty much same with radials except examples.Linear gradient examples can be found at: https://drafts.csswg.org/css-images/#funcdef-linear-gradient
To run test you can use
./mach test-unit -p stylecommand.