Ticket #1089 (new patch)

Opened 5 years ago

Last modified 4 years ago

rewrite tests for resizableintegerarray as PIR, plus add new tests

Reported by: kurahaupo Owned by:
Priority: minor Milestone:
Component: testing Version: 1.6.0
Severity: low Keywords: test rewrite PIR
Cc: Language:
Patch status: new Platform: all

Description

 http://nopaste.snit.ch/18199

Also includes patch to make sure zero-fill always applies to new elements, although this behaviour could be debated. (IMO zero-fill belongs at the same semantic level as push, pop, shift and unshift. Since resizableintegerarray is (a) derived from fixedintegerarray and (b) does these other things, it seems to me a reasonable place to implement the zero-fill behaviour too.)

Attachments

resizableintegerarray.pmc.p1 Download (419 bytes) - added by kurahaupo 5 years ago.
Fix typo in comments
resizableintegerarray.t.patch1 Download (18.3 KB) - added by kurahaupo 5 years ago.
resizableintegerarray.patch2 Download (3.8 KB) - added by kurahaupo 5 years ago.
Implement (and test) zero-fill on resizing
ria.patch Download (2.6 KB) - added by dukeleto 4 years ago.
Zero out elements of ResizableIntegerArrays

Change History

Changed 5 years ago by dukeleto

This patch is a good start, but needs some work. Firstly, there is a bunch of dead commented out code. That should either be made to work or removed. Next, please break up test rewriting from add features or fixing bugs into separate patches. Rewriting some tests and adding tests in the same patch is fine. It is generally preferable to have somewhat atomic patches, that way, if something does not work, it does not block the other parts from getting applied.

Also, if you can attach the patch directly to the TT with the "Attach file" button, that will be best and easiest for everyone.

Changed 5 years ago by kurahaupo

Fix typo in comments

Changed 5 years ago by kurahaupo

Changed 5 years ago by kurahaupo

Implement (and test) zero-fill on resizing

Changed 5 years ago by dukeleto

First two patches were applied in r41750 . The third patch, which has to do with zeroing out elements in resized arrays, should probably get a code review on parrot-dev.

Changed 4 years ago by dukeleto

The third patch does not pass the one test that it adds. I have updated the resizableintegerarray.patch2 to apply against r48587.

Changed 4 years ago by dukeleto

Zero out elements of ResizableIntegerArrays

Note: See TracTickets for help on using tickets.