Test Suite for unit manipulation programs.
- Author
- J. T. Whelan john..nosp@m.whel.nosp@m.an@li.nosp@m.go.o.nosp@m.rg
Description
This program tests the various units-manipulation routines, as well as the pre-defined units defined in Units.h. For each successful test, it prints "PASS" to standard output.
Uses
int XLALUnitCompare(const LALUnit *unit1, const LALUnit *unit2)
Returns 0 if the the normal form of the two unit structures are the same or > 0 if they are different...
LALUnit * XLALParseUnitString(LALUnit *output, const char *string)
Returns the pointer output upon return or a pointer to newly allocated memory if output was NULL; on ...
char * XLALUnitAsString(char *string, UINT4 length, const LALUnit *input)
Returns the pointer to the input string, which is populated with the unit string if successful.
LALUnit * XLALUnitMultiply(LALUnit *output, const LALUnit *unit1, const LALUnit *unit2)
This function multiplies together the LALUnit structures *(input->unitOne) and *(input->unitTwo),...
int XLALUnitNormalize(LALUnit *unit)
Returns 0 upon success or XLAL_FAILURE if the input pointer is NULL, in which case xlalErrno is set t...
LALUnit * XLALUnitRaiseRAT4(LALUnit *output, const LALUnit *input, const RAT4 *power)
Raises a LALUnit structure to a rational power given by the RAT4 structure power.
Definition in file UnitsTest.c.