On Wed, Oct 26, 2016 at 03:03:07PM +0200, wm4 wrote: > On Wed, 26 Oct 2016 14:56:01 +0200 > Michael Niedermayer <mich...@niedermayer.cc> wrote: > > > On Wed, Oct 26, 2016 at 02:00:46PM +0200, wm4 wrote: > > > On Sat, 22 Oct 2016 23:40:42 -0700 > > > Thomas Turner <thomas...@googlemail.com> wrote: > > > > > > > Function(s) Tested: av_packet_clone(). > > > > > > > > This test checks if av_packet_clone() can successfully make a copy of > > > > an AVPacket. > > > > Compares all data members in AVPacket EXCEPT for "buf" because "buf" is > > > > initialized > > > > to NIL in the original AVPacket [to be cloned]. > > > > > > > > This test also prints out the all the contents of the original and > > > > cloned AVPackets. > > > > > > > > Signed-off-by: Thomas Turner <thomas...@googlemail.com> > > > > --- > > > > > > Am I the only one who thinks this test is overly complex and worthless? > > > (Checks if each field got copied... come on, that's not useful. And > > > would probably bitrot quickly as nobody would add new fields to the > > > test anyway.) > > > > what do you suggest, how to test it ? > > or should we deprecate av_packet_clone() > > nothing uses it, so the total lack of tests and uses means noone > > would notice (quickly) if it broke ever > > > > [...] > > I don't think it's the choice between either adding a test > for av_packet_clone or deprecating it?
Its desirable to have code tested to identify problems, code thats not tested at all bit rots eventually. The issue is propotional to the complexity of the code and how activly it changes so the risk is low with av_packet_clone() but still > > Also, av_packet_clone is 100% implemented using public functions and > doesn't access any AVPacket fields itself. yes but these public functions themselfs arent tested for completness either. iam not arguing for a specific way of testing this, but that some clean test would be desirable [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The greatest way to live with honor in this world is to be what we pretend to be. -- Socrates
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel