Summary

Harness status: OK

Found 11 tests

Details

ResultTest NameMessage
PassConverting a CSSNumericValue to a sum with invalid units throws SyntaxError
Asserts run
Pass
assert_throws_dom("SyntaxError", function "() => CSS.px(1).toSum('px', 'lemon')")
    at Test.<anonymous> ( /css/css-typed-om/stylevalue-subclasses/numeric-objects/toSum.tentative.html:11:3)
PassConverting a CSSNumericValue with an invalid sum value to a sum throws TypeError
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "() => new CSSMathMax(1, CSS.px(1)).toSum('number')")
    at Test.<anonymous> ( /css/css-typed-om/stylevalue-subclasses/numeric-objects/toSum.tentative.html:15:3)
PassConverting a CSSNumericValue with compound units to a sum throws TypeError
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "() => new CSSMathProduct(CSS.px(1), CSS.px(1)).to('px')")
    at Test.<anonymous> ( /css/css-typed-om/stylevalue-subclasses/numeric-objects/toSum.tentative.html:19:3)
PassConverting a CSSNumericValue to a sum with an incompatible unit throws TypeError
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "() => CSS.px(1).toSum('number')")
    at Test.<anonymous> ( /css/css-typed-om/stylevalue-subclasses/numeric-objects/toSum.tentative.html:23:3)
PassConverting a CSSNumericValue to a sum with units that are not addable throws TypeError
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "() => CSS.px(1).toSum('px', 's')")
    at Test.<anonymous> ( /css/css-typed-om/stylevalue-subclasses/numeric-objects/toSum.tentative.html:27:3)
PassConverting a CSSNumericValue with leftover units to a sum throws TypeError
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "() => new CSSMathSum(CSS.px(1), CSS.em(1)).toSum('px')")
    at Test.<anonymous> ( /css/css-typed-om/stylevalue-subclasses/numeric-objects/toSum.tentative.html:31:3)
PassConverting CSSNumericValue to a sum with its own unit returns itself
Asserts run
Pass
assert_equals("CSSMathSum", "CSSMathSum")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_equals(1, 1)
    at assert_style_value_array_equals ( /css/css-typed-om/resources/testhelper.js:123:3)
Pass
assert_equals("CSSUnitValue", "CSSUnitValue")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_approx_equals(1, 1, 0.000001)
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:61:7)
Pass
assert_equals("number", "number")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:62:7)
Pass
assert_equals("CSSMathSum", "CSSMathSum")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_equals(1, 1)
    at assert_style_value_array_equals ( /css/css-typed-om/resources/testhelper.js:123:3)
Pass
assert_equals("CSSUnitValue", "CSSUnitValue")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_approx_equals(1, 1, 0.000001)
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:61:7)
Pass
assert_equals("px", "px")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:62:7)
PassConverting CSSNumericValue to a sum with no arguments returns all the units in sorted order
Asserts run
Pass
assert_equals("CSSMathSum", "CSSMathSum")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_equals(4, 4)
    at assert_style_value_array_equals ( /css/css-typed-om/resources/testhelper.js:123:3)
Pass
assert_equals("CSSUnitValue", "CSSUnitValue")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_approx_equals(1, 1, 0.000001)
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:61:7)
Pass
assert_equals("em", "em")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:62:7)
Pass
assert_equals("CSSUnitValue", "CSSUnitValue")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_approx_equals(1, 1, 0.000001)
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:61:7)
Pass
assert_equals("px", "px")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:62:7)
Pass
assert_equals("CSSUnitValue", "CSSUnitValue")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_approx_equals(1, 1, 0.000001)
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:61:7)
Pass
assert_equals("rem", "rem")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:62:7)
Pass
assert_equals("CSSUnitValue", "CSSUnitValue")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_approx_equals(1, 1, 0.000001)
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:61:7)
Pass
assert_equals("vw", "vw")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:62:7)
PassConverting CSSNumericValue to a sum with a relative unit converts correctly
Asserts run
Pass
assert_equals("CSSMathSum", "CSSMathSum")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_equals(1, 1)
    at assert_style_value_array_equals ( /css/css-typed-om/resources/testhelper.js:123:3)
Pass
assert_equals("CSSUnitValue", "CSSUnitValue")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_approx_equals(20.000000000000004, 20, 0.000001)
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:61:7)
Pass
assert_equals("mm", "mm")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:62:7)
PassConverting CSSNumericValue to a sum containing extra units returns zero for those units
Asserts run
Pass
assert_equals("CSSMathSum", "CSSMathSum")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_equals(3, 3)
    at assert_style_value_array_equals ( /css/css-typed-om/resources/testhelper.js:123:3)
Pass
assert_equals("CSSUnitValue", "CSSUnitValue")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_approx_equals(0, 0, 0.000001)
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:61:7)
Pass
assert_equals("em", "em")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:62:7)
Pass
assert_equals("CSSUnitValue", "CSSUnitValue")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_approx_equals(1, 1, 0.000001)
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:61:7)
Pass
assert_equals("px", "px")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:62:7)
Pass
assert_equals("CSSUnitValue", "CSSUnitValue")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_approx_equals(0, 0, 0.000001)
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:61:7)
Pass
assert_equals("vw", "vw")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:62:7)
PassCSSNumericValue.toSum converts greedily
Asserts run
Pass
assert_equals("CSSMathSum", "CSSMathSum")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_equals(2, 2)
    at assert_style_value_array_equals ( /css/css-typed-om/resources/testhelper.js:123:3)
Pass
assert_equals("CSSUnitValue", "CSSUnitValue")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_approx_equals(2, 2, 0.000001)
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:61:7)
Pass
assert_equals("cm", "cm")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:62:7)
Pass
assert_equals("CSSUnitValue", "CSSUnitValue")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_approx_equals(0, 0, 0.000001)
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:61:7)
Pass
assert_equals("mm", "mm")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:62:7)
Pass
assert_equals("CSSMathSum", "CSSMathSum")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_equals(2, 2)
    at assert_style_value_array_equals ( /css/css-typed-om/resources/testhelper.js:123:3)
Pass
assert_equals("CSSUnitValue", "CSSUnitValue")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_approx_equals(20.000000000000004, 20, 0.000001)
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:61:7)
Pass
assert_equals("mm", "mm")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:62:7)
Pass
assert_equals("CSSUnitValue", "CSSUnitValue")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:51:3)
Pass
assert_approx_equals(0, 0, 0.000001)
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:61:7)
Pass
assert_equals("cm", "cm")
    at assert_style_value_equals ( /css/css-typed-om/resources/testhelper.js:62:7)