patchGNU Octave - Patches: patch #10192, BIST for lin2mu.m file

 
 

patch #10192: BIST for lin2mu.m file

Submitter:  None
Submitted:  Wed 30 Mar 2022 09:57:44 PM UTC
   
 
Category:  Core : other Priority:  3 - Low
Status:  Done Privacy:  Public
Assigned to:  siko1056 Originator Email:  -email is unavailable-
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 01 May 2022 04:11:54 AM UTC, comment #8: 

Again many thanks for your work Shreya and sorry for the delay.  I reviewed your patch and pushed it here:

https://hg.savannah.gnu.org/hgweb/octave/rev/e4f9db6543bd

Your contribution will become part of Octave 8 next year! 🙂👍

Kai Torben Ohlhus <siko1056>
Group Member
Sun 10 Apr 2022 07:21:35 AM UTC, comment #7: 

Hello, please have a look at my recent Patch file.

(file #53062)

Anonymous
Sat 02 Apr 2022 04:55:07 PM UTC, comment #6: 

Regarding the test cases themselves this looks already very good.

Now lets make them short and readable.  For example, this is hard to understand:


%!assert (lin2mu(3,[]) == lin2mu(3,[16]) && lin2mu(3,[])==[255])


Make two test cases out of them:


%!assert (lin2mu (3, []), 255)
%!assert (lin2mu (3, 16), 255)


Same here:


%!test
%! x = -1:1;
%! y = x';
%! assert (lin2mu(x)==lin2mu(y)' && lin2mu(x)==[0,255,128]);


In my opinion this is more readable:


%!test
%! x = -1:1;
%! y = x';
%! assert (lin2mu (x), [0, 255, 128])
%! assert (lin2mu (x), (lin2mu (y))')


And again the test cases themselves look great already.  Lets make them ready to be pushed.

Kai Torben Ohlhus <siko1056>
Group Member
Sat 02 Apr 2022 04:44:06 PM UTC, comment #5: 

Next formal issue is the user:


# User shreya Gupta <shreyaguptammm.com>


Maybe this has to be fixed in your ".hgrc" file?  It should read:


# User Shreya Gupta <shreyaguptammm@gmail.com>


As commit message I suggest based on your wording:


* scripts/audio/lin2mu.m : Add BISTs for input validation (patch #10192)


Kai Torben Ohlhus <siko1056>
Group Member
Sat 02 Apr 2022 04:40:07 PM UTC, comment #4: 

Thank you for the patch.

Now comes a bit teadious work, but understanding the demands will make our communication with patches much easier.

1. With the new patch, we now always have to apply two patches to check your changes.  We prefer having one patch only.  Thus instead of commit changes over your changes, always go back to a "clean" Octave repository state and commit changes to your previous commit with


hg commit --amend


If things are messed up.  Copy the changed files to your Download directory, remove all previous commits / changesets with


hg strip


https://www.mercurial-scm.org/repo/hg/help/strip

and copy the file back into a "clean" Octave repository and make the commit again.

Kai Torben Ohlhus <siko1056>
Group Member
  Spam posted by anonymous
  Spam posted by anonymous
Wed 30 Mar 2022 11:09:30 PM UTC, comment #1: 

thanks for helping add tests for functions without any! i see that there's only one specific error in message to trigger, so the error tests seem fine.  Would you also be able to add tests verifying the warning is triggered, and are you able to help add any tests of expected output for different inputs?

Nicholas Jankowski <nrjank>
Group Member
Wed 30 Mar 2022 09:57:44 PM UTC, original submission:  

lin2mu function must require an argument
n in the lin2mu function must be 0,8,16

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #53062:  lin2muTest.patch added by None (1KiB - text/x-patch)
file #53032:  lin2muTest.patch added by None (2KiB - text/x-patch)
file #53024:  lin2muTest.patch added by None (753B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-05-01 siko1056 StatusIn Progress Done
        Open/ClosedOpen Closed
    2022-04-10 None Attached File- Added lin2muTest.patch, #53062
    2022-04-02 siko1056 StatusNone In Progress
        Assigned toNone siko1056
    2022-04-02 None Attached File- Added lin2muTest.patch, #53032
    2022-03-30 nrjank CategoryNone Core : other
        Priority5 - Normal 3 - Low
    2022-03-30 None Attached File- Added lin2muTest.patch, #53024

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code