Skip to content

Extend beamline-relevant arithmetic with "Circularity" tests of conversions #2042

@CoePaul

Description

@CoePaul

a) Much of the arithmetic needed for attenuation related caculations involves conversions
b) these conversion function usual appear in bi-directional pairings

If f(x) is the opposite function of g(x)
then g( f(x) ) should equal x
and likewise f( g(x) ) should equal x

testing this is not a unit-test level check ( as it involves compound actions outside the scope of lowest level UNIT testing ) - but it is still a documentable, specification that the code should adhere to

thus: Write a general integration test thing to check circularity of a pair of functions

ie make the test code so that I can pass in as software arguments
a) a numerical value x suitably within the valid range of the relelevant functions
b) a conversion function f
c) the opposite conversion function g

Write a test suite which :
for each conversion-function-pairing created in parallel issues ( off this ticket's main parent )
creates a pair of tests

  1. passes in the x, f, g
  2. passes in the x, g, f

Acceptance Criteria

  • Specific criteria that will be used to judge if the issue is fixed

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions