Accessor: test/TestAccessor

test/TestAccessor

Test accessor with various input and output types and handlers. This accessor is designed to be instantiable on any host, including the common host, which does not implement the require() function nor provide any mechanism for loading accessors.

Version:
  • $$Id$$
Author:
  • Edward A. Lee
Source:
Inputs:
Name Type Description
untyped An untyped input that will accept any JavaScript object.
numeric A numeric input.
boolean A boolean input.
Outputs:
Name Type Description
typeOfUntyped Produces the type (a string) of the input named 'untyped'.
jsonOfUntyped Produces a JSON representation of the input named 'untyped', created using JSON.toString().
numericPlusP Produces the value of the 'numeric' input plus 'p'.
negation Produces the negation of the 'boolean' input.
Parameters:
Name Type Description
p A parameter with default value 42.

Methods

(static) formatOutput()

Define a function that can be overridden in subclasses.

Source: