Closed Bug 1171006 Opened 11 years ago Closed 11 years ago

Some tests in intl/uconv/tests/unit no longer test anything

Categories

(Core :: Internationalization, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: smontagu, Assigned: smontagu)

References

Details

(Keywords: regression)

Attachments

(1 file)

I came across this while writing tests for bug 1170932: test_bug399257.js and test_bug601429.js no longer test anything, because when bug 943268 changed from using GetDecoderList to a hard-coded array it also removed the line - var decodingConverter = CreateScriptableConverter(); leaving decodingConverter undefined further on in the test. This didn't cause a failure, because it was expected that some charsets wouldn't have an encoder and attempting to set those charsets in the converter would throw. It's possibly a flaw in the test that each individual throw only triggers a warning and it's not considered an error if EVERY charset throws.
Attached patch Patch — — Splinter Review
Also fixes an off-by-one error in the loop
Attachment #8614919 - Flags: review?(VYV03354)
Comment on attachment 8614919 [details] [diff] [review] Patch Are some charsets lacking decoders? If not, let's simply remove try...catch from test_bug601429.js.
Attachment #8614919 - Flags: review?(VYV03354) → review+
(In reply to Masatoshi Kimura [:emk] from comment #2) > Are some charsets lacking decoders? If not, let's simply remove try...catch > from test_bug601429.js. Yes, you're right. With the hard-coded array of charsets, we don't need the try...catch for either encoders or decoders.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: