-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEAT: STYLIZE function and STYLES keyword #3825
base: master
Are you sure you want to change the base?
Conversation
We definitely want at least some manual tests, but we'll also see if @PeterWAWood has thoughts on automated tests for this. Peter, do we have any areas or approaches used for semi-automated and manual tests? Not as good as fully automated, but better than nothing. |
I don't mind if you use some of the https://github.com/red/red/blob/master/tests/source/view/base-self-test.red functionality. The only reason I didn't split it from the tests is because I didn't have any GUI tests other than Maybe an overkill though... ☺ |
Firstly, I don't think semi-automated or manual tests are useful for the regression testing approach that is used. Nobody will take the time to run or check them. Secondly, little thought has been given to testing Red GUI. It is possible that the test GUI backend could provide, at least, the first level of automated testing. Unfortunately, I've never been able to successfully compile a program using it. It should be possible to develop a testing approach based on generating an image of what is displayed and comparing it against expected images. There would need to be one expected image for each OS/GUI backend combination. Perhaps @hiiamboris's work could be expanded on to come up with something more generic. It would be a lot of work to develop a good approach to GUI testing. Personally, I think it would be a worthwhile investment as the GUI seems to be the source of many issues. If something is needed quickly, Python AutoGUI could be usedto check the correctness of displays generated by Red GUI. |
@PeterWAWood Testing |
@PeterWAWood manual tests aren't perfect for regression testing, but I don't know who we'll assign to write an automated GUI testing system. It will be a huge effort. My thought is that if there are at least some tests that can be run easily, if not automatically, should something change or break, it provides at least some baseline for comparison. I'm all for full automation but, realistically, it's a low priority compared to many other things. Until then, what can we do (which is better than nothing)? |
@rebolek Thanks Bolek. (I really should have worked this out myself :-( ) |
@greggirwin My perception, based on what has happened in the past, is that manual regression tests rarely get run. When they do most people don't bother to check the results, they assume all is well if the test doesn't crash. |
@greggirwin Here is a case in point. I ran the manual view-test.red against the latest master version. A screen shot is attached. I can see 8 errors. There could well be more, I'm not sure how the display should look. |
I'm working on tests in https://github.com/rebolek/red/tree/stylize-test branch. It's the system I described, It compares output of |
@greggirwin @dockimbel While working on tests, I found one oddity. Functionally, it's same, but returning same type would be better IMO. I think there are four different possibilities, I'll list them from (IMO) lowest priority to highest:
What do you think? |
I like that
becomes
yes? I vote for |
@greggirwin Thanks for comment! I prefer |
Added new commit - styles are now always NOTE: |
It looks like the CI error was a timeout. If somebody backs me up on that, and this all looks good, I'll merge it. |
|
@hiiamboris thanks for info, I'll check it. |
@hiiamboris Problem confirmed and found what causes it. Now I need to come up with some fix. |
1ec06cd
to
7218fb4
Compare
This merge request implements
stylize
function andstyle
VID keyword as available in Rebol 2. The syntax is same. It addsmake-style
function toVID
object to reduce duplicated code.