Opened 9 years ago

Closed 8 years ago

#4934 closed Bug (fixed)

Create a test harness, and use it for current tests

Reported by: gvdl Owned by: jordan
Priority: Normal Milestone: 2.70
Component: libtransmission Version: 2.60
Severity: Minor Keywords: patch-provided
Cc: gvdl@…

Description

Having just completed a few years at college as a teaching assistant I have been dinging people for cut and paste programming. Now I just have to fix it when I find it. I've copied the primary check() macro into a header and wrote a couple of small static inline functions for running tests from an array of pointers to functions.

Attachments (1)

4934-txTestHeader.patch (29.1 KB) - added by gvdl 9 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by gvdl

comment:1 Changed 9 years ago by gvdl

  • Keywords patch-provided added; patch-needed removed
  • Summary changed from Move make check tests infrastructure into a header to Create a test harness, and use it for currents tests

comment:2 Changed 9 years ago by gvdl

  • Summary changed from Create a test harness, and use it for currents tests to Create a test harness, and use it for current tests

comment:3 Changed 9 years ago by gvdl

  • Version changed from 2.52 to 2.52+

comment:4 Changed 8 years ago by jordan

  • Component changed from Transmission to libtransmission
  • Milestone changed from None Set to 2.70
  • Owner set to jordan
  • Severity changed from Normal to Minor
  • Status changed from new to assigned
  • Version changed from 2.52+ to 2.60

And you even moved the rules for peer_msgs_test in Makefile.am so that they're sorted alphabetically along with the rest of the rules! :)

I did notice one issue with this patch, it adds a new semicolon in magnet-test.c where it shouldn't be:

  • for( i=0; i<20; ++i )

+ for( i=0; i<20; ++i );

check( info->hash[i] == dec[i] );

Other than that, though, it looks great.

comment:5 Changed 8 years ago by jordan

  • Resolution set to fixed
  • Status changed from assigned to closed

Added in r13442

Note: See TracTickets for help on using tickets.