Closed
Bug 1230685
Opened 9 years ago
Closed 9 years ago
Remove custom test runner from test_storage_value_array.js and test_unicode.js
Categories
(Core :: SQLite and Embedded Database Bindings, defect)
Core
SQLite and Embedded Database Bindings
Tracking
()
RESOLVED
FIXED
mozilla47
People
(Reporter: mak, Assigned: tranj23)
Details
(Whiteboard: [good first bug][lang=js])
Attachments
(1 file, 1 obsolete file)
9.86 KB,
patch
|
mak
:
review+
|
Details | Diff | Splinter Review |
The tests should use add_test instead of a custom test runner
Comment 1•9 years ago
|
||
Hi,
I am a beginner and would like to work on this bug. Can you please tell me how to go ahead with this bug?
Assignee | ||
Comment 2•9 years ago
|
||
Hi, I made this patch based on what changes I think are needed, but I'm not completely sure. Also, the tests didn't seem to run correctly when I used add_test so instead I used add_task
Attachment #8714052 -
Flags: review?(mak77)
Reporter | ||
Comment 3•9 years ago
|
||
Comment on attachment 8714052 [details] [diff] [review]
rev1 - Replaced function declarations with add_task
Review of attachment 8714052 [details] [diff] [review]:
-----------------------------------------------------------------
please, rememeber to append the reviewer at the end of the commit message as ". r=mak"
Likely add_test didn't work as you were expecting cause it still requires to call run_next_test() at the end of the test, so either
add_task(function* myTest() {
...
});
or
add_test(function myTest() {
...
run_next_test();
});
We don't have a strict requirement whether to use one or the other one, usually synchronous tests keep using add_test, but both will work.
Note the comments here are valid for both tests, even if I only commented on one of them.
::: storage/test/unit/test_storage_value_array.js
@@ +182,1 @@
> }
This boilerplate is no more needed.
@@ -206,5 @@
> - tests[i]();
> - }
> -
> - cleanup();
> -}
you are not invoking cleanup() anymore at the end of the test this way.
You can use do_register_cleanup(cleanup); inside the setup() function
Attachment #8714052 -
Flags: review?(mak77)
Reporter | ||
Comment 4•9 years ago
|
||
The review context is broken, the no more needed boilerplate is:
function run_test() {
run_next_test();
}
Assignee | ||
Comment 5•9 years ago
|
||
Ok I made changes based on feedback
Attachment #8714052 -
Attachment is obsolete: true
Attachment #8716389 -
Flags: review?(mak77)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → tranj23
Reporter | ||
Comment 6•9 years ago
|
||
Comment on attachment 8716389 [details] [diff] [review]
rev2 - Replaced function declarations with add_task
Review of attachment 8716389 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with the following comments addressed
::: storage/test/unit/test_storage_value_array.js
@@ +21,5 @@
> stmt.execute();
>
> stmt.reset();
> stmt.finalize();
> +
some trailing spaces here
::: storage/test/unit/test_unicode.js
@@ +23,5 @@
> stmt.bindByIndex(0, LATIN1_ae);
> stmt.bindByIndex(1, 4);
> stmt.execute();
> stmt.finalize();
> +
some trailing spaces
Attachment #8716389 -
Flags: review?(mak77) → review+
Reporter | ||
Comment 7•9 years ago
|
||
Comment 9•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Updated•2 months ago
|
Product: Toolkit → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•