tml-validation-refs

TML validation of external refs

npm install tml-validation-refs
2 downloads in the last week
8 downloads in the last month

tml-validation-refs(3) -- basic ref validation tests

SYNOPSIS

tml-validation-refs basic validation tests.

OPTIONS

SYNTAX

ENVIRONMENT

RETURN VALUES

STANDARDS

SECURITY CONSIDERATIONS

BUGS

HISTORY

AUTHOR

SEE ALSO

IMPLEMENTATION


ValidationRefs

    @purpose Test usage of code artifacts defined in another module;
    @author Erin Phillips;
    @version 1.0;
    @history 2013-04-30 EMP [0.0.1-3] add-tml-build;
    @history 2013-04-30 EMP [0.0.1-4] fix-description;

resources

    CON = console

    TYP = tml-validation

locals

    log = CON::log
        @purpose local log reference;

tags

notes

code

-- TYPES --;

type InternalBase;

type NumberRange(val#,min#,max#)

    extends TYP::NumberRange(val,min,max);

singleton type NumberSingleton(val#)

    extends TYP::NumberSingleton(val);

-- TESTS --;

test TYPE_EXTERNAL

test-eq : should initialize state

    (new NumberRange(11,10,12)).isStable() vs true

test-eq : should return state

    (new NumberRange(11,10,12)).isOverflow() vs false

test-eq : should change state to overflow

    (new NumberRange(15,10,12)).isOverflow() vs true

test-eq : should change state to underflow

    (new NumberRange(8,10,12)).isUnderflow() vs true

test-throw : should throw on state violation

    ((new NumberRange(8,10,12)) << 100);

test-eq : should only make one singleton instance

    (new NumberSingleton(55)).getValue()
        vs (new NumberSingleton(99)).getValue()
    ;
npm loves you