This document contains the assertion specification for the WAP June 2000 release of the: WMLScript Standard Libraries technical specification.
The following specifications were used to generate the assertions:
The specification is organized such that there is a section for each section of the WMLScript Standard Libraries specification in which assertions can be found.
For each assertion in the specifications, a corresponding entry in this test
specification contains the following elements:
| ID: |
The name by which the test is known |
| Class: |
An assertion Class as defined in IEEE Std 1003.3. These types are: |
| A |
A mandatory, testable assertion. |
| B |
A mandatory, but untestable assertion. |
| C |
An optional, testable assertion. |
| D |
An optional, but untestable assertion. |
|
| Scope: |
If an assertion is type C or D, this entry describes the option that needs
to be supported in order to activate the test. |
| Text: |
The text of the assertion and a reference to the source specification
from which the assertion is derived. |
| Note: |
Any supplementary information associated with the assertion. For example
it may suggest a strategy for the test implementation of the assertion
or it may propose rationale as to why a test is classified as untestable.
|
There are no testable assertions in this section.
There are no testable assertions in this section.
There are no specific assertions or tests created for this section.
Lang.float() returning false is tested within the Lang/float tests.
Lang.parseFloat() returning invalid is tested within the Lang/parseFloat tests.
All functions returning invalid when floating point support is required is tested within each applicable library function.
|
| ID: |
wmlscriptlib/lang/min/2 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the Lang.min function is called with two values as arguments, and the two values are equal, the first value is returned. [WMLScript Standard Libraries Specification section 7.2] |
| Note: |
Reclassified to Class A for wmlssl June 2000. The first value is integer 3, the second value is float 3.0. The return of the first value is tested by checking the typeof the return value to be an integer. |
|
|
| ID: |
wmlscriptlib/lang/min/4 |
| Class: |
A |
| Text: |
The value and type returned by the Lang.min function must be the va value of the smallest value and of type 'integer' when that value is an integer. [WMLScript Standard Libraries Specification section 7.2] |
| Note: |
New assertion for wmlssl June 2000 |
|
| ID: |
wmlscriptlib/lang/min/5 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
The value and type returned by the Lang.min function must be the va value of the smallest value and of type 'floating point' when that value is a floating point. [WMLScript Standard Libraries Specification section 7.2] |
| Note: |
New assertion for wmlssl June 2000 |
|
|
| ID: |
wmlscriptlib/lang/max/2 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the Lang.max function is called with two values as arguments, and the two values are equal, the first value is returned. [WMLScript Standard Libraries Specification section 7.3] |
| Note: |
Reclassified to Class A for wmlssl June 2000. The first value is integer 3, the second value is float 3.0. The return of the first value is tested by checking the typeof the return value to be an integer. |
|
|
| ID: |
wmlscriptlib/lang/max/4 |
| Class: |
A |
| Text: |
The value and type returned by the Lang.max function must be the value of the largest value and of type 'integer' when that value is an integer. [WMLScript Standard Libraries Specification section 7.3] |
| Note: |
New assertion for wmlssl June 2000 |
|
| ID: |
wmlscriptlib/lang/max/5 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
The value and type returned by the Lang.max function must be the value of the largest value and of type 'floating point' when that value is a floating point. [WMLScript Standard Libraries Specification section 7.3] |
| Note: |
New assertion for wmlssl June 2000 |
|
| ID: |
wmlscriptlib/lang/parsefloat/1 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the Lang.parseFloat function is called with a string as an argument, it returns a floating-point value reflecting the value of the contents of the string from its beginning up to the first character that is not a legal part of a
floating-point representation. [WMLScript Standard Libraries Specification section 7.5] |
|
| ID: |
wmlscriptlib/lang/parsefloat/2 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the Lang.parseFloat function is called with a string as an argument, and that string contains no floating-point value representation, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 7.5] |
|
| ID: |
wmlscriptlib/lang/parsefloat/3 |
| Class: |
C |
| Scope: |
"The client DOES NOT support floating-point operations" |
| Text: |
When the implementation does not support floating-point operations and
the Lang.parseFloat function is called, it returns 'invalid'. [WMLScript Standard Libraries Specification section 7.5] |
|
|
|
| ID: |
wmlscriptlib/lang/random/1 |
| Class: |
A |
| Text: |
When the Lang.random function is called with a value as the parameter,
it returns an integer value that is greater than or equal to 0 but less than
or equal to the value of the parameter. [WMLScript Standard Libraries Specification section 7.13] |
|
|
|
|
| ID: |
wmlscriptlib/lang/random/5 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the Lang.random function is called with a floating point value as the parameter, it returns an integer value that is greater than or equal to 0 but less than or equal to the value of the parameter. [WMLScript Standard Libraries Specification section 7.13] |
| Note: |
New assertion for wmlssl June 2000. |
|
| ID: |
wmlscriptlib/float/pow/1 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the Float.pow function is called with two numbers val1 and val2, it returns the floating point result of raising val1 to the val2 power. [WMLScript Standard Libraries Specification section 8.4] |
|
| ID: |
wmlscriptlib/float/pow/2 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the Float.pow function is called with two numbers val1 and val2,
and val1 = 0 and val2 is less than 0, then the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.4] |
|
| ID: |
wmlscriptlib/float/pow/3 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the Float.pow function is called with two numbers val1 and val2,
and val1 is less than 0 and val2 is not an integer, then the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.4] |
|
| ID: |
wmlscriptlib/float/pow/4 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the Float.pow function is called with either parameter not a
number, then the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.4] |
|
| ID: |
wmlscriptlib/float/pow/5 |
| Class: |
C |
| Scope: |
"The client DOES NOT support floating-point operations" |
| Text: |
When the Float.pow function is called and floating-point operations are
not supported, then the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.4] |
|
| ID: |
wmlscriptlib/float/round/1 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the Float.round function is called with a number val1, it returns
the number value that is closest to val1 and is equal to an integer. [WMLScript Standard Libraries Specification section 8.5] |
|
| ID: |
wmlscriptlib/float/round/2 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the Float.round function is called with a number val1, and that
number is equally close to two integer values, the function returns the larger
number value. [WMLScript Standard Libraries Specification section 8.5] |
|
| ID: |
wmlscriptlib/float/round/3 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the Float.round function is called with a number val1, and that
number is already an integer, the function returns that number. [WMLScript Standard Libraries Specification section 8.5] |
|
|
| ID: |
wmlscriptlib/float/round/5 |
| Class: |
C |
| Scope: |
"The client DOES NOT support floating-point operations" |
| Text: |
When the Float.round function is called and floating-point operations
are not supported, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 8.5] |
|
| ID: |
wmlscriptlib/string/charat/1 |
| Class: |
A |
| Text: |
When the String.charAt function is called with a string parameter String
and a number parameter Index, it returns a string of length one reflecting the
character at position Index within string String. [WMLScript Standard Libraries Specification section 9.3] |
|
| ID: |
wmlscriptlib/string/charat/2 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.charAt function is called with a string parameter String
and a number parameter Index, and the Index is a floating-point value, it is
converted to an integer. Then the function returns a string of length one reflecting the
character at position Index within string String. [WMLScript Standard Libraries Specification section 9.3] |
|
| ID: |
wmlscriptlib/string/charat/3 |
| Class: |
A |
| Text: |
When the String.charAt function is called with a string parameter String
and a number parameter Index, and the Index value is out of range, the
function returns an empty string. [WMLScript Standard Libraries Specification section 9.3] |
|
|
|
| ID: |
wmlscriptlib/string/substring/1 |
| Class: |
A |
| Text: |
When the String.subString function is called with parameters string
String, number StartIndex, and number Length, the function returns a string
reflecting the portion of String beginning at StartIndex and continuing for
Length characters. [WMLScript Standard Libraries Specification section 9.4] |
|
| ID: |
wmlscriptlib/string/substring/2 |
| Class: |
A |
| Text: |
When the String.subString function is called with parameters string
String, number StartIndex, and number Length, and StartIndex is less than
zero, the function returns a string
reflecting the portion of String beginning at position zero and continuing for
Length characters. [WMLScript Standard Libraries Specification section 9.4] |
|
| ID: |
wmlscriptlib/string/substring/3 |
| Class: |
A |
| Text: |
When the String.subString function is called with parameters string
String, number StartIndex, and number Length, and StartIndex is larger than
the last index of String, the function returns the empty string. [WMLScript Standard Libraries Specification section 9.4] |
|
| ID: |
wmlscriptlib/string/substring/4 |
| Class: |
A |
| Text: |
When the String.subString function is called with parameters string
String, number StartIndex, and number Length, and Length is larger than the
remaining number of characters in String, Length is replaced with the number
of remaining characters. [WMLScript Standard Libraries Specification section 9.4] |
|
| ID: |
wmlscriptlib/string/substring/5 |
| Class: |
A |
| Text: |
When the String.subString function is called with parameters string
String, number StartIndex, and number Length, and Length less than or equal to
zero, the function returns an empty string. [WMLScript Standard Libraries Specification section 9.4] |
|
| ID: |
wmlscriptlib/string/substring/6 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.subString function is called with parameters string
String, number StartIndex, and number Length, and either StartIndex or Length
or of type floating-point, they are converted to integers. Then the function
returns a string starting at the StartIndex-th position of String and
continuing for Length characters. [WMLScript Standard Libraries Specification section 9.4] |
|
|
|
| ID: |
wmlscriptlib/string/elementat/1 |
| Class: |
A |
| Text: |
When the String.elementAt function is called with parameters string
String, number Index, and string Separator, it returns a string reflecting
Index-th element of String, where elements are separated by the first
character of Separator. [WMLScript Standard Libraries Specification section 9.8] |
|
| ID: |
wmlscriptlib/string/elementat/2 |
| Class: |
A |
| Text: |
When the String.elementAt function is called with parameters string String, number Index, and string Separator, and Index is less than zero, it returns a string reflecting the first element of String, where the elements is separated by the first character of Separator. [WMLScript Standard Libraries Specification section 9.8] |
|
| ID: |
wmlscriptlib/string/elementat/3 |
| Class: |
A |
| Text: |
When the String.elementAt function is called with parameters string String, number Index, and string Separator, and Index is larger than the number of elements in String, it returns a string reflecting the last element of String, where element is separated by the first character of Separator. [WMLScript Standard Libraries Specification section 9.8] |
|
| ID: |
wmlscriptlib/string/elementat/4 |
| Class: |
A |
| Text: |
When the String.elementAt function is called with parameters string
String, number Index, and string Separator, and String is an empty string,
then an empty string is returned. [WMLScript Standard Libraries Specification section 9.8] |
|
| ID: |
wmlscriptlib/string/elementat/5 |
| Class: |
A |
| Text: |
When the String.elementAt function is called with parameters string
String, number Index, and string Separator, and Separator is an empty string,
then the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.8] |
|
| ID: |
wmlscriptlib/string/elementat/6 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.elementAt function is called with parameters string
String, number Index, and string Separator, and Index is of type
floating-point, then it is first converted to a type integer. Then the
function returns a string reflecting the Index-th element of String, where
elements are separated by the first character of Separator. [WMLScript Standard Libraries Specification section 9.8] |
|
| ID: |
wmlscriptlib/string/removeat/1 |
| Class: |
A |
| Text: |
When the String.removeAt function is called with parameters string
String, number Index, and string Separator, it returns a string where the
Index-th element and separator have been removed, where elements are separated by the first
character of Separator. [WMLScript Standard Libraries Specification section 9.9] |
|
| ID: |
wmlscriptlib/string/removeat/2 |
| Class: |
A |
| Text: |
When the String.removeAt function is called with parameters string
String, number Index, and string Separator, and Index is less than 0, it returns a string where the
first element and separator have been removed, where elements are separated by the first
character of Separator. [WMLScript Standard Libraries Specification section 9.9] |
|
| ID: |
wmlscriptlib/string/removeat/3 |
| Class: |
A |
| Text: |
When the String.removeAt function is called with parameters string
String, number Index, and string Separator, and Index is larger than the number of elements, it returns a string where the
last element and separator have been removed, where elements are separated by the first
character of Separator. [WMLScript Standard Libraries Specification section 9.9] |
|
| ID: |
wmlscriptlib/string/removeat/4 |
| Class: |
A |
| Text: |
When the String.removeAt function is called with parameters string
String, number Index, and string Separator, and String is empty, the function
returns an empty string. [WMLScript Standard Libraries Specification section 9.9] |
|
| ID: |
wmlscriptlib/string/removeat/5 |
| Class: |
A |
| Text: |
When the String.removeAt function is called with parameters string
String, number Index, and string Separator, and Separator is an empty string,
then the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.9] |
|
| ID: |
wmlscriptlib/string/removeat/6 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.removeAt function is called with parameters string
String, number Index, and string Separator, and Index is of type
floating-point, then it is first converted to a type integer. Then the
function returns a string reflecting the removal of the Index-th element of String, where
elements are separated by the first character of Separator. [WMLScript Standard Libraries Specification section 9.9] |
|
| ID: |
wmlscriptlib/string/replaceat/1 |
| Class: |
A |
| Text: |
When the String.replaceAt function is called with parameters string
String, string Element, number Index, and string Separator, it returns a
string where the Index-th element is replaced with the contents of Element
(where elements are separated by the first character of Separator). [WMLScript Standard Libraries Specification section 9.10] |
|
| ID: |
wmlscriptlib/string/replaceat/2 |
| Class: |
A |
| Text: |
When the String.replaceAt function is called with parameters string
String, string Element, number Index, and string Separator, and Index is less
than zero, it returns a
string where the first element is replaced with the contents of Element
(where elements are separated by the first character of Separator). [WMLScript Standard Libraries Specification section 9.10] |
|
| ID: |
wmlscriptlib/string/replaceat/3 |
| Class: |
A |
| Text: |
When the String.replaceAt function is called with parameters string
String, string Element, number Index, and string Separator, and Index is
larger than the number of elements, it returns a
string where the last element is replaced with the contents of Element
(where elements are separated by the first character of Separator). [WMLScript Standard Libraries Specification section 9.10] |
|
| ID: |
wmlscriptlib/string/replaceat/4 |
| Class: |
A |
| Text: |
When the String.replaceAt function is called with parameters string
String, string Element, number Index, and string Separator, and String is
empty the function returns a new string with the given Element [WMLScript Standard Libraries Specification section 9.10] |
|
| ID: |
wmlscriptlib/string/replaceat/5 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.replaceAt function is called with parameters string
String, string Element, number Index, and string Separator, and Index is of
type floating-point, Index is first converted to an integer. Then the function
returns a string in which the Index-th element is replaced with the contents
of Element. [WMLScript Standard Libraries Specification section 9.10] |
|
| ID: |
wmlscriptlib/string/replaceat/6 |
| Class: |
A |
| Text: |
When the String.replaceAt function is called with parameters string
String, string Element, number Index, and string Separator, and Separator is
an empty string, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.10] |
|
| ID: |
wmlscriptlib/string/insertat/1 |
| Class: |
A |
| Text: |
When the String.insertAt function is called with parameters string
String, string Element, number Index, and string Separator, it returns a
string where the string Element and a Separator are inserted at the Index-th element
(where elements are separated by the first character of Separator). [WMLScript Standard Libraries Specification section 9.11] |
|
| ID: |
wmlscriptlib/string/insertat/2 |
| Class: |
A |
| Text: |
When the String.insertAt function is called with parameters string
String, string Element, number Index, and string Separator, and Index is less
than zero, it returns a
string where the Element and a Separator are inserted prior to the first
element
(where elements are separated by the first character of Separator). [WMLScript Standard Libraries Specification section 9.11] |
|
| ID: |
wmlscriptlib/string/insertat/3 |
| Class: |
A |
| Text: |
When the String.insertAt function is called with parameters string
String, string Element, number Index, and string Separator, and Index is
larger than the number of elements, it returns a
string where Element and a Separator are appended at the end of the String
(where elements are separated by the first character of Separator). [WMLScript Standard Libraries Specification section 9.11] |
|
| ID: |
wmlscriptlib/string/insertat/4 |
| Class: |
A |
| Text: |
When the String.insertAt function is called with parameters string
String, string Element, number Index, and string Separator, and String is
empty the function returns a string containing only Element. [WMLScript Standard Libraries Specification section 9.11] |
|
| ID: |
wmlscriptlib/string/insertat/5 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.insertAt function is called with parameters string
String, string Element, number Index, and string Separator, and Index is of
type floating-point, Index is first converted to an integer. Then the function
returns a string in which Element and a Separator are inserted at the Index-th element of String. [WMLScript Standard Libraries Specification section 9.11] |
|
| ID: |
wmlscriptlib/string/insertat/6 |
| Class: |
A |
| Text: |
When the String.insertAt function is called with parameters string
String, string Element, number Index, and string Separator, and Separator is
an empty string, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.11] |
|
| ID: |
wmlscriptlib/string/compare/1 |
| Class: |
A |
| Text: |
When the String.compare function is called with parameters string
String1 and string String2, and String1 is lexicographically equal to
String2, the function returns 0. [WMLScript Standard Libraries Specification section 9.14] |
|
| ID: |
wmlscriptlib/string/compare/2 |
| Class: |
A |
| Text: |
When the String.compare function is called with parameters string
String1 and string String2, and String1 is lexicographically less than
String2, the function returns -1. [WMLScript Standard Libraries Specification section 9.14] |
|
| ID: |
wmlscriptlib/string/compare/3 |
| Class: |
A |
| Text: |
When the String.compare function is called with parameters string
String1 and string String2, and String1 is lexicographically greater than
String2, the function returns 1. [WMLScript Standard Libraries Specification section 9.14] |
|
|
|
The String.format tests have been substantially revised for WAP version 1.2.
The tests have been divided into four sections:
| ID: |
wmlscriptlib/string/format/1 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string Format and Any
Value, and Format contains more than one format specifier, subsequent
specifiers are replaced with the empty string
in the string the function returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/2 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string Format and Any
Value, and Format contains two percent signs (%) in sequence,
the function returns a string in which those signs are converted into a single
percent sign. [WMLScript Standard Libraries Specification section 9.16] |
|
|
| ID: |
wmlscriptlib/string/format/4 |
| Class: |
C |
| Scope: |
"The client DOES NOT support floating-point operations" |
| Text: |
When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%f", the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/d/1 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", a decimal integer "Value" and the "Format" contains a format specifier of the form "%d",
the function replaces the "%d" with a representation of the value of the integer using the form [-]d (where d represents 1 or more decimal digits) in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/d/2 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", a decimal integer "Value" and the "Format" contains a format specifier of the form "%wd" and the number of digits in "Value" is less than the specified width "w",
the function replaces the "%wd" with a representation of the value of the integer using the form [-]d (where d represents 1 or more decimal digits) with blanks added to the left until the minimum width is reached in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/d/3 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", a decimal integer "Value" and the "Format" contains a format specifier of the form "%wd" and the number of digits in "Value" is greater than or equal to the specified width "w",
the function replaces the "%wd" with a representation of the value of the integer using the form [-]d (where d represents 1 or more decimal digits) in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/d/4 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", a decimal integer "Value" and the "Format" contains a format specifier of the form "%wd" and "w" is a negative decimal integer, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/d/5 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", a decimal integer "Value" and the "Format" contains a format specifier of the form "%w.pd" and the number of digits in "Value" is less than the specified precision "p",
the function replaces the "%w.pd" with a representation of the value of the integer using the form [-]d (where d represents 1 or more decimal digits) with zeros added to the left until the minimum precision is reached in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/d/6 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", a decimal integer "Value" and the "Format" contains a format specifier of the form "%w.pd" and the number of digits in "Value" is greater than or equal to the specified precision "p",
the function replaces the "%w.pd" with a representation of the value of the integer using the form [-]d (where d represents 1 or more decimal digits) in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/d/7 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", a decimal integer "Value" and the "Format" contains a format specifier of the form "%w.pd" and "p" is a negative decimal integer, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/d/8 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string Format and Any
Value, and Format contains a format specification of the pattern "%.0d"
and the value of Value is zero,
the function
replaces the "%.0d" with an empty string
in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/d/9 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%d",
the function replaces the "%d" with a representation of the value of the string converted to an integer using the form [-]d (where d represents 1 or more decimal digits) in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/d/10 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%d",
the function replaces the "%d" with a representation of the value of the floating point converted to an integer using the form [-]d (where d represents 1 or more decimal digits) in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/f/1 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.format function is called with parameters string "Format", a
floating point "Value" and the "Format" contains a format specifier of the
form "%f", the function replaces the "%f" with a representation of the value
of the floating point using the form [-]d.nnnnnn (where nnnnnn represents
the default of six digits after the decimal point in the string it returns). [WMLScript Standard Libraries Specification section 9.16] |
| Note: |
Tests that; 1 evaluates to 1.000000, -1 evaluates to -1.000000,
1.1 evaluates to 1.100000 and -1 evaluates tp -1.100000 |
|
| ID: |
wmlscriptlib/string/format/f/2 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%wf" and the number of digits in "Value" is less than the specified width "w",
the function replaces the "%wf" with a representation of the value of the floating point using the form [-]d.d (where d represents 1 or more decimal digits) with blanks added to the left until the minimum width is reached in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/f/3 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%wf" and the number of digits in "Value" is greater than or equal to the specified width "w",
the function replaces the "%wf" with a representation of the value of the floating point using the form [-]d.d (where d represents 1 or more decimal digits) in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
| Note: |
using %2f and the value 1.0, the test checks that 1.000000 is returned |
|
| ID: |
wmlscriptlib/string/format/f/4 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%wf" and "w" is a negative decimal integer, the function return 'invalid'. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/f/5 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%w.pf" and the number of digits after the decimal point in "Value" is less than the specified precision "p",
the function replaces the "%w.pf" with a representation of the value of the floating point using the form [-]d.d (where d represents 1 or more decimal digits) with zeros padding until the minimum precision is reached in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/f/6 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%w.pf" and the number of digits after the decimal point in "Value" is greater than or equal to the specified precision "p",
the function replaces the "%w.pf" with a representation of the value of the floating point using the form [-]d.d (where d represents 1 or more decimal digits) where the digits following the decimal point are rounded to the number of digits specified by precison "p" in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/f/7 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.format function is called with parameters string "Format", a floating point "Value" which has no digits preceeding the decimal point and the "Format" contains a format specifier of the form "%f", the function replaces the "%f" with a representation of the value of the floating point using the form [-]d.d (where d represents 1 or more decimal digits) where one digit appears before the decimal point in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/f/8 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.format function is called with parameters string Format, a floating point Value, and Format contains a format specification of the pattern "%.0f", the function replaces the "%.0f" with a representation of Value rounded to the nearest integer with no trailing decimal point in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/f/9 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.format function is called with parameters string Format, a floating point Value, and Format contains a format specification of the pattern "%.f", the function replaces the "%.f" with a representation of Value rounded to the nearest integer with no trailing decimal point in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/f/10 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%f",
the function replaces the "%f" with a representation of the value of the string converted to a floating point using the form [-]d.d (where d represents 1 or more decimal digits) in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
| Note: |
use -10.123 which should convert to -10.123000 when considering rounding (32 bit precision) and the default of 6 digits after the decimal point. |
|
| ID: |
wmlscriptlib/string/format/s/1 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%s", the function replaces the "%s" with a representation of the string "Value" in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/s/2 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%ws" and the number of characters in the string "Value" is less than the specified width "w", the function replaces the "%ws" with a representation of the string "Value" with blanks added to the left until the minimum width is reached in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
| Note: |
using %9s and the value "string", the test checks "<space><space><space>string" is returned. |
|
| ID: |
wmlscriptlib/string/format/s/3 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%ws" and the number of characters in "Value" is greater than or equal to the specified width "w", the function replaces the "%ws" with a representation of the string "Value" in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/s/4 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%ws" and "w" is a negative decimal integer, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/s/5 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%w.ps",
the function replaces the "%w.ps" with a representation of the string "Value" using the characters up to the end of the string "Value" or until the precision value is reached in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/s/6 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%w.ps" and w is larger than p,
the function replaces the "%w.ps" with a representation of the string "Value" ignoring the value of w in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
| Note: |
using %9.8s and %9.3s, the test checks that string is formatted as "<space><space>string" and "str" respectively. |
|
| ID: |
wmlscriptlib/string/format/s/7 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", a string "Value" and the "Format" contains a format specifier of the form "%w.ps" and "p" is a negative decimal integer, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/s/8 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string Format and Any
Value, and Format contains a percent sign (%) followed by a period (.) and a
non-negative decimal precision p followed by an "s", the function
interprets Value as a string value and replaces the "%.ps" with up to p characters from Value in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/s/9 |
| Class: |
A |
| Text: |
When the String.format function is called with parameters string "Format", an integer "Value" and the "Format" contains a format specifier of the form "%s", the function replaces the "%s" with a representation of the integer converted to a string "Value" in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
| ID: |
wmlscriptlib/string/format/s/10 |
| Class: |
C |
| Scope: |
"The client DOES support floating-point operations" |
| Text: |
When the String.format function is called with parameters string "Format", a floating point "Value" and the "Format" contains a format specifier of the form "%s", the function replaces the "%s" with a representation of the floating point converted to a string "Value" in the string it returns. [WMLScript Standard Libraries Specification section 9.16] |
|
|
| ID: |
wmlscriptlib/url/getport/2 |
| Class: |
A |
| Text: |
When the URL.getPort function is called with a parameter string URL that
contains a relative URL, it returns a string containing the port-number portion of
the relative URL. [WMLScript Standard Libraries Specification section 10.4] |
|
|
|
|
|
| ID: |
wmlscriptlib/url/getparameters/1 |
| Class: |
A |
| Text: |
When the URL.getParameters function is called with a parameter string URL that
contains an absolute URL, it returns a string containing the parameter portion of
the URL. [WMLScript Standard Libraries Specification section 10.6] |
|
| ID: |
wmlscriptlib/url/getparameters/2 |
| Class: |
A |
| Text: |
When the URL.getParameters function is called with a parameter string URL that
contains a relative URL, it returns a string containing the parameter portion of
the relative URL. [WMLScript Standard Libraries Specification section 10.6] |
|
|
|
| ID: |
wmlscriptlib/url/getparameters/5 |
| Class: |
A |
| Text: |
When the URL.getParameters function is called with a parameter string URL that
contains an absolute URL that has no parameter portion, the function returns
an empty string. [WMLScript Standard Libraries Specification section 10.6] |
|
| ID: |
wmlscriptlib/url/getparameters/6 |
| Class: |
A |
| Text: |
When the URL.getParameters function is called with a parameter string URL that
contains a relative URL that contains no parameter portion, the function
returns an empty string. [WMLScript Standard Libraries Specification section 10.6] |
|
|
|
|
|
|
| ID: |
wmlscriptlib/url/getquery/6 |
| Class: |
A |
| Text: |
When the URL.getQuery function is called with a parameter string URL that
contains a relative URL that does not contain a query portion, the function
returns the enpty string. [WMLScript Standard Libraries Specification section 10.7] |
|
|
| ID: |
wmlscriptlib/url/getfragment/2 |
| Class: |
A |
| Text: |
When the URL.getFragment function is called with a parameter string URL that
contains a relative URL, it returns a string containing the fragment portion of
the relative URL. [WMLScript Standard Libraries Specification section 10.8] |
|
|
|
| ID: |
wmlscriptlib/url/getfragment/5 |
| Class: |
A |
| Text: |
When the URL.getFragment function is called with a parameter string URL that
contains an absolute URL that does not have a fragment portion, the function
returns an empty string. [WMLScript Standard Libraries Specification section 10.8] |
|
| ID: |
wmlscriptlib/url/getfragment/6 |
| Class: |
A |
| Text: |
When the URL.getFragment function is called with a parameter string URL that
contains a relative URL that does not have a fragment portion, the function
returns an empty string. [WMLScript Standard Libraries Specification section 10.8] |
|
| ID: |
wmlscriptlib/url/resolve/1 |
| Class: |
A |
| Text: |
When the URL.resolve function is called with parameters string BaseURL
and string EmbeddedURL, where BaseURL is an absolute URL, the function returns
an absolute URL derived from the combination of BaseURL and EmbeddedURL. [WMLScript Standard Libraries Specification section 10.11] |
|
|
| ID: |
wmlscriptlib/url/resolve/3 |
| Class: |
A |
| Text: |
When the URL.resolve function is called with parameters string BaseURL
and string EmbeddedURL, where either parameter's values contain invalid URL
syntax, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.11] |
|
| ID: |
wmlscriptlib/url/resolve/4 |
| Class: |
A |
| Text: |
When the URL.resolve function is called with parameters string BaseURL
and string EmbeddedURL, and the BaseURL's path component is an empty string. The function returns an absolute URL derived from the combination of BaseURL and EmbeddedURL with a single slash character ("/") assumed as the path. [WMLScript Standard Libraries Specification section 10.11] |
| Note: |
New assertion for wmlssl June 2000 |
|
| ID: |
wmlscriptlib/url/loadstring/1 |
| Class: |
A |
| Text: |
When the URL.loadString function is called with the parameters string
URL and string ContentType, where URL is an absolute URL and ContentType is a
single content type specifier beginning with "text/", the function returns a
string that contains the resource. [WMLScript Standard Libraries Specification section 10.14] |
|
| ID: |
wmlscriptlib/url/loadstring/2 |
| Class: |
A |
| Text: |
When the URL.loadString function is called with the parameters string
URL and string ContentType, where URL is an absolute URL that cannot be
loaded, the function returns an integer error code. [WMLScript Standard Libraries Specification section 10.14] |
|
| ID: |
wmlscriptlib/url/loadstring/3 |
| Class: |
A |
| Text: |
When the URL.loadString function is called with the parameters string
URL and string ContentType, where URL is an absolute URL for which the content type
does not match ContentType,
the function returns an integer error code. [WMLScript Standard Libraries Specification section 10.14] |
|
|
| ID: |
wmlscriptlib/url/loadstring/5 |
| Class: |
A |
| Text: |
When the URL.loadString function is called with the parameters string
URL and string ContentType, where the ContentType contains leading spaces, the
function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.14] |
|
| ID: |
wmlscriptlib/url/loadstring/6 |
| Class: |
A |
| Text: |
When the URL.loadString function is called with the parameters string
URL and string ContentType, where the ContentType contains trailing spaces, the
function returns 'invalid'. [WMLScript Standard Libraries Specification section 10.14] |
|
| ID: |
wmlscriptlib/url/loadstring/7 |
| Class: |
A |
| Text: |
When the URL.loadString function is called with the parameters string
URL and string ContentType, where more than one ContentType has been specified
the function returns invalid [WMLScript Standard Libraries Specification section 10.14] |
|
| ID: |
wmlscriptlib/wmlbrowser/setvar/1 |
| Class: |
A |
| Text: |
When the WMLBrowser.setVar function is called with the parameters string
Name and string Value, the browser context variable Name is set to have the
value Value and the function returns true. [WMLScript Standard Libraries Specification section 11.2] |
|
|
| ID: |
wmlscriptlib/wmlbrowser/setvar/3 |
| Class: |
A |
| Text: |
When the WMLBrowser.setVar function is called with the parameters string
Name and string Value, and the value of Name does not conform to the
definition of variable names in the WML 1.1 specification, the function
returns 'invalid'. [WMLScript Standard Libraries Specification section 11.2] |
|
| ID: |
wmlscriptlib/wmlbrowser/setvar/4 |
| Class: |
A |
| Text: |
When the WMLBrowser.setVar function is called with the parameters string
Name and string Value, and the value of Value is not legal CDATA as defined in
the XML specification,
the function
returns 'invalid'. [WMLScript Standard Libraries Specification section 11.2] |
|
| ID: |
wmlscriptlib/wmlbrowser/setvar/5 |
| Class: |
A |
| Text: |
When the WMLBrowser.setVar function is called with the parameters string
Name and string Value. The function returns false if the browser context variable Name cannot be successfully set. [WMLScript Standard Libraries Specification section 11.2] |
| Note: |
New assertion for wmlssl June 2000. The call WMLBrowser.setVar('','testit') will be used to yield a "false" return. |
|
| ID: |
wmlscriptlib/wmlbrowser/go/1 |
| Class: |
A |
| Text: |
When the WMLBrowser.go function is called with a parameter string
URL, the WML browser queues a "GO" task to the URL and the function returns
the empty string. When control returns to the WML Browser, the GO task is
executed. [WMLScript Standard Libraries Specification section 11.3] |
|
| ID: |
wmlscriptlib/wmlbrowser/go/2 |
| Class: |
A |
| Text: |
When the WMLBrowser.go function is called with a parameter string
URL, where URL is the empty string, the WML browser cancels any previously
queued GO or PREV task in the WML browser and the function returns the empty
string. [WMLScript Standard Libraries Specification section 11.3] |
|
|
| ID: |
wmlscriptlib/wmlbrowser/go/4 |
| Class: |
A |
| Text: |
When the WMLBrowser.go function is called with a parameter string
URL, and a fatal error occurs, the WML browser cancels any pending go() requests. [WMLScript Standard Libraries Specification section 11.3] |
| Note: |
New assertion for wmlssl June 2000. Lang.abort will be called after the WMLBrowser.go to cancel that go() request. |
|
|
| ID: |
wmlscriptlib/wmlbrowser/refresh/2 |
| Class: |
A |
| Text: |
When the WMLBrowser.refresh function is called, the WML Browser updates
its context and the function returns an empty string. The refresh must not restart any suspended timers. [WMLScript Standard Libraries Specification section 11.7] |
| Note: |
New asssertion for wmlssl June 2000 |
|
| ID: |
wmlscriptlib/wmlbrowser/refresh/3 |
| Class: |
C |
| Scope: |
"The client DOES NOT support immediate refresh" |
| Text: |
When the WMLBrowser.refresh function is called, and the implementation does not support immediate refresh, the function returns 'invalid'. [WMLScript Standard Libraries Specification section 11.7] |
| Note: |
New asssertion for wmlssl June 2000. The spec here implies an option yet this is not seen in the SCR. |
|
| ID: |
wmlscriptlib/wmlbrowser/refresh/4 |
| Class: |
B |
| Text: |
When the WMLBrowser.refresh function is called, and the refresh fails, the WML Browser updates its context and the function returns an non-empty string. [WMLScript Standard Libraries Specification section 11.7] |
| Note: |
New assertion for wmlssl June 2000. The test is untestable because there is no portable way of causing the failure of a refresh. |
|
| ID: |
wmlscriptlib/dialogs/confirm/1 |
| Class: |
A |
| Text: |
When the Dialogs.confirm function is called with the parameters string
Message, string Ok, and string Cancel, the system displays the message Message
and two reply alternatives from Ok and Cancel. If the user selects
the Ok string, the function returns true. [WMLScript Standard Libraries Specification section 12.2] |
|
| ID: |
wmlscriptlib/dialogs/confirm/2 |
| Class: |
A |
| Text: |
When the Dialogs.confirm function is called with the parameters string
Message, string Ok, and string Cancel, the system displays the message Message
and two reply alternatives from Ok and Cancel. If the user selects
the Cancel string, the function returns false. [WMLScript Standard Libraries Specification section 12.2] |
|
| ID: |
wmlscriptlib/dialogs/confirm/3 |
| Class: |
A |
| Text: |
When the Dialogs.confirm function is called with the parameters string
Message, string Ok, and string Cancel, where Ok and Cancel are empty strings,
the system displays the message Message
and two implementation-defined reply alternatives. If the user selects
the "positive" choice, the function returns true. [WMLScript Standard Libraries Specification section 12.2] |
|
| ID: |
wmlscriptlib/dialogs/confirm/4 |
| Class: |
A |
| Text: |
When the Dialogs.confirm function is called with the parameters string
Message, string Ok, and string Cancel, where Ok and Cancel are empty strings,
the system displays the message Message
and two implementation-defined reply alternatives. If the user selects
the "negative" choice, the function returns false. [WMLScript Standard Libraries Specification section 12.2] |
|
|
|