Page MenuHomePhabricator

test/ui_box: add unittest for Efl.Ui.Box
ClosedPublic

Authored by YOhoho on Dec 16 2018, 5:47 PM.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
YOhoho created this revision.Dec 16 2018, 5:47 PM
YOhoho requested review of this revision.Dec 16 2018, 5:47 PM
YOhoho updated this revision to Diff 18789.Jan 24 2019, 1:30 AM
YOhoho retitled this revision from test/ui_box: add test for Efl.Ui.Box to test/ui_box: add unittest for Efl.Ui.Box.
YOhoho edited the summary of this revision. (Show Details)

more testcase

YOhoho edited the summary of this revision. (Show Details)Jan 24 2019, 1:35 AM
YOhoho removed a parent revision: D7409: gfx: Add size hint fill (EO).
YOhoho updated this revision to Diff 19215.Feb 6 2019, 7:32 AM

Aspect type make race conditon. to resolve this problem, ui_box support only aspect_both type.

zmike added a subscriber: zmike.Feb 8 2019, 9:11 AM

This is a great start for testing, thanks for taking the time to work on it. I like the diagrams, but those won't be accessible to anyone using git log or in the event that the project moves away from phabricator. It may be worth adding the diagram image files into the patch and keeping them in a subdir of the unit tests so people can easily reference them?

YOhoho added a comment.EditedFeb 11 2019, 2:32 AM
In D7463#140506, @zmike wrote:

This is a great start for testing, thanks for taking the time to work on it. I like the diagrams, but those won't be accessible to anyone using git log or in the event that the project moves away from phabricator. It may be worth adding the diagram image files into the patch and keeping them in a subdir of the unit tests so people can easily reference them?

But, image file is hard to maintain..
What do you think of the diagram viewer?
source code :


Hints struct can be shared with efl_ui_hint_data.c file which have global Hint struct array. (see line 9 #include "efl_ui_hint_data.c")
Hint properties can be displayed in popup when the button is clicked. it is not implemented yet.
When someone want to modify container unit test, they just need to edit efl_ui_hint_data.c.

YOhoho updated this revision to Diff 19305.Feb 12 2019, 1:20 AM

Add hint_margin and layout geometry test

zmike added a comment.Feb 12 2019, 5:55 AM
In D7463#140506, @zmike wrote:

This is a great start for testing, thanks for taking the time to work on it. I like the diagrams, but those won't be accessible to anyone using git log or in the event that the project moves away from phabricator. It may be worth adding the diagram image files into the patch and keeping them in a subdir of the unit tests so people can easily reference them?

But, image file is hard to maintain..
What do you think of the diagram viewer?

I like this idea, but I'm concerned that this adds too much burden to anyone trying to view it or add tests.

Let's compromise for now: start a wiki page here for something like "unit test flowcharts" and post the images there along with the tests they relate to. Then you can put a link to that page in the commit log here (maybe also in the file?) so people can reference it. I'll merge this patch once the updates are done.

zmike added a comment.Feb 12 2019, 6:04 AM

Actually, I have one test case I'd like to see added: can you add a test where:

  • the box has 3 contents with no size hints other than an aspect hint (BOTH, 1:3)
  • the box is sized something like 300x900
  • verify that the contents are all 100x300
  • resize box to 150x450
  • verify contents are all 50x150

I think this is likely to be a common use case.

YOhoho updated this revision to Diff 19348.EditedFeb 13 2019, 4:46 AM

add aspect resize unit test.

@zmike
I'm not sure whether this test is what you intended.

zmike added a comment.Feb 13 2019, 5:31 AM

Perfect, thanks!

zmike accepted this revision.Feb 13 2019, 5:32 AM
This revision is now accepted and ready to land.Feb 13 2019, 5:32 AM
Closed by commit rEFLb1f280f0c2c3: test/ui_box: add unittest for Efl.Ui.Box (authored by Yeongjong Lee <yj34.lee@samsung.com>, committed by zmike). · Explain WhyFeb 13 2019, 6:23 AM
This revision was automatically updated to reflect the committed changes.