-
Notifications
You must be signed in to change notification settings - Fork 222
[[ Tests ]] Add tests for LCB log and throw in widget OnCreate #5525
[[ Tests ]] Add tests for LCB log and throw in widget OnCreate #5525
Conversation
@livecodeali, thanks for your PR! By analyzing the history of the files in this pull request, we identified @livecodefraser to be a potential reviewer. |
8f6805a
to
dba7cb4
Compare
|
||
put empty into gLastSentWidgetError | ||
|
||
create widget "Test" as "com.livecode.lcs_tests.core.widgetthrow" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@livecodeali I'm wondering if errorDialog
should be centrally handled with a way to tell the test lib to collect a particular error rather than quit. Otherwise maybe pass if pError
is not error
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about passing... what's the use case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment any other execution error in this script will be captured and ignored. If it's all handled centrally then it's not an issue as you would tell the test lib the name of the error to expect for a test and it would treat all others the way it does now.
dba7cb4
to
112751c
Compare
tests/_testrunner.livecodescript
Outdated
@@ -92,6 +92,13 @@ on DoQuit | ||
if "errorDialog" is in the pendingMessages then | ||
send "DoQuit" to me in 0 millisecs | ||
else | ||
local tError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this check be after each test rather than at the end. Perhaps in TestRunnerInvokeTestCommand
? That way we know which test was the problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, yes, just fixed that :-)
LCB logging is done by posting to the event queue. This patch ensures the event queue is checked when waiting in no UI mode as well as pending messages.
112751c
to
eec8080
Compare
@livecode-vulcan review ok eec8080 |
💙 review by @runrevmark ok eec8080 |
[[ Tests ]] Add tests for LCB log and throw in widget OnCreate
😎 test success eec8080
|
No description provided.