Ticket #3344 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Add unit test suite for AlgorithmFactory

Reported by: Russell Taylor Owned by: Keith Brown
Priority: critical Milestone: Release 3.0
Component: Framework Keywords: Maintenance
Cc: Blocked By:
Blocking: Tester: Russell Taylor

Description

This is far from the trivial concrete type instantiation of DynamicFactory that it originally was - it should have unit tests.

Change History

comment:1 Changed 9 years ago by Nick Draper

  • Status changed from new to assigned
  • Owner set to Anyone

comment:2 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 30 to Iteration 31

Bulk move of tickets to iteration 31 at the iteration 30 code freeze

comment:3 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 32 to Iteration 33

Moved to iteration 33 at iteration 32 code freeze

comment:4 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.1 to Release 2.2

Moved at end of release 2.1

comment:5 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.2 to Release 2.3

comment:6 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.3 to Release 2.4

Moved to milestone 2.4

comment:7 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.4 to Release 2.5

Moved at the code freeze for release 2.4

comment:8 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.5 to Release 2.6

Moved to r2.6 at the end of r2.5

comment:9 Changed 7 years ago by Nick Draper

  • Status changed from assigned to new

comment:10 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:11 Changed 7 years ago by Nick Draper

  • Priority changed from minor to critical
  • Keywords Maintenance added

comment:12 Changed 7 years ago by Nick Draper

  • Owner changed from Anyone to Keith Brown

comment:13 Changed 7 years ago by Keith Brown

  • Milestone changed from Release 2.6 to Release 3.0

comment:14 Changed 7 years ago by Keith Brown

  • Status changed from new to inprogress

comment:15 Changed 7 years ago by Keith Brown

Started on AlgorithmFactoryTest

The AlgorithmFactoryTest.h file has a skeleton in there now ready for the tests

AlgorithmTest has had a bit of code refactored into it's own .h file. They are "fake" algorithms specifically for testing.

Refs #3344

Changeset: bd6ef70aa4108d5583ffb73e353aa57980e1ed16

comment:16 Changed 7 years ago by Keith Brown

First test written for AlgorithmFactory

Susbscribe now has a test. A second testCreate was deleted.

Refs #3344

Changeset: 1365fad26c58b5f5aac579f894546d2daf6c6b36

comment:17 Changed 7 years ago by Keith Brown

Progress being made with test suite

The test suite is coming along, only a few more tests to write

Refs #3344

Changeset: 0dab2805731eeeeb972b3df5a5e4669856474764

comment:18 Changed 7 years ago by Keith Brown

Fixed some bugs in AlgorithmFactory

There were a couple of rather major bugs which it's a wonder hadn't been found until now.

The first was that decodeName() could go out the range of the string and return garbage if there wasn't a bar cahracter in the supplied string. A check has been added which will throw an exception if one isn't found.

The second was that getCategories() didn't work at all as the loop wasn't executing due to the variable "it_end" used in the condition not being initialised correctly. It's now initialised correctly to categoryMap.end().

Refs #3344

Changeset: 277778632ce73a9407ac1eb854f05886b12a709a

comment:19 Changed 7 years ago by Keith Brown

Finished AlgorithmFactoryTest and added a new Fake Algorithm

A new fake algorithm has been added to help test the category methods.

The Test suite has been completed with tests for all methods and error cases where applicable

Refs #3344

Changeset: 54316b7d885cb4b84324b7c43712666672b5fca2

comment:20 Changed 7 years ago by Keith Brown

Fixed a load of identical compiler warnings

The compliers were complainign about a conversion from size_t to int, so i changed it to top them complianing

Refs #3344

Changeset: 377243a30d4c7e75f37d86d0da0bff647921afca

comment:21 Changed 7 years ago by Keith Brown

  • Status changed from inprogress to verify
  • Resolution set to fixed

comment:22 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:23 Changed 7 years ago by Russell Taylor

  • Status changed from verifying to closed

The value of writing unit tests demonstrated here, I think :)

comment:24 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4191

Note: See TracTickets for help on using tickets.