<-- Previous || Up || Next -->

Convert Test Function
Units Class

Function ConvertTest( _
    ) As Integer
    ' Perform some important consistency checks of the current loaded unit, prefix,
    ' and global text replacement definitions.

    'Remarks:  Consistency Checks:  This function does the following:
    '     * Finds measurement definitions whose Code and/or space-stripped Code is the same as that of another unit.  Duplicate unit codes should never occur, and duplicate space-stripped codes should normally be removed before definitions are made publicly available.
    '     * Finds prefixes, and combinations of prefixes and units, which cannot be parsed by the conversion program.
    '     * Finds units which cannot be parsed by the conversion program.
    '     * Displays warnings about Units whose user-specified categories are unknown or which differ from the calculated category.
    '     * Finds cases where there are multiple Category-type units whose definitions equate to the same combination of base units.
    '     * Attempts to determine the category of definitions whose user-specified Category is "unknown".
    'Arguments:  Function does not accept any arguments.
    'Return Value:  Function returns True when no errors are found within the current measurement definitions.  Returns False when errors are found within the definitions.  The function will perform all of its consistency checks before returning a value; it does not stop when it encounters errors.
    'Example:
    '  Debug.Print ConvertTest()

    ' Assume that the definitions are valid; will reset return value to False when
    ' and if errors are found in the definitions.
    ConvertTest = True

    Const strFn = "ConvertTest"
    Debug.Print strFn & ": Info: Begin " & Time

    InitializeMaybe

    If Not UnitDuplicateTest() Then ConvertTest = False
    If Not PrefixTest() Then ConvertTest = False
    If Not UnitTest() Then ConvertTest = False
    If Not UnitCategoryTest() Then ConvertTest = False
    If Not UnitCategoryUnknownTest() Then ConvertTest = False

    Debug.Print strFn & ": Info: End " & Time
End Function

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.