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)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox45 --- affected
firefox47 --- fixed

People

(Reporter: mak, Assigned: tranj23)

Details

(Whiteboard: [good first bug][lang=js])

Attachments

(1 file, 1 obsolete file)

The tests should use add_test instead of a custom test runner
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?
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)
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)
The review context is broken, the no more needed boilerplate is: function run_test() { run_next_test(); }
Ok I made changes based on feedback
Attachment #8714052 - Attachment is obsolete: true
Attachment #8716389 - Flags: review?(mak77)
Assignee: nobody → tranj23
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+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Product: Toolkit → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: