⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 201656 in webkit


Ignore:
Timestamp:
Jun 3, 2016, 2:13:34 PM (10 years ago)
Author:
benjamin@webkit.org
Message:

Fix some more INFINITI->INFINITY typos

Unreviewed.

The tests were not covering the edge cases they were supposed to test.

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-03

  • tests/stress/math-ceil-basics.js:

(testMathCeilOnConstants):

  • tests/stress/math-clz32-basics.js:

(testMathClz32OnDoubles):
(testMathClz32OnConstants):

  • tests/stress/math-floor-basics.js:

(testMathFloorOnConstants):

  • tests/stress/math-round-basics.js:

(testMathRoundOnConstants):

  • tests/stress/math-trunc-basics.js:

(testMathTruncOnConstants):

Location:
trunk/Source/JavaScriptCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r201654 r201656  
     12016-06-03  Benjamin Poulain  <bpoulain@apple.com>
     2
     3        Fix some more INFINITI->INFINITY typos
     4
     5        Unreviewed.
     6
     7        The tests were not covering the edge cases they were supposed to test.
     8
     9        * tests/stress/math-ceil-basics.js:
     10        (testMathCeilOnConstants):
     11        * tests/stress/math-clz32-basics.js:
     12        (testMathClz32OnDoubles):
     13        (testMathClz32OnConstants):
     14        * tests/stress/math-floor-basics.js:
     15        (testMathFloorOnConstants):
     16        * tests/stress/math-round-basics.js:
     17        (testMathRoundOnConstants):
     18        * tests/stress/math-trunc-basics.js:
     19        (testMathTruncOnConstants):
     20
    1212016-06-02  Gavin & Ellie Barraclough  <barraclough@apple.com>
    222
  • trunk/Source/JavaScriptCore/tests/stress/math-ceil-basics.js

    r197380 r201656  
    221221    if (value === value)
    222222        throw new Error("Math.ceil(NaN) = " + value);
    223     var value = Math.ceil(Number.POSITIVE_INFINITI);
    224     if (value === value)
    225         throw new Error("Math.ceil(Number.POSITIVE_INFINITI) = " + value);
    226     var value = Math.ceil(Number.NEGATIVE_INFINITI);
    227     if (value === value)
    228         throw new Error("Math.ceil(Number.NEGATIVE_INFINITI) = " + value);
     223    var value = Math.ceil(Number.POSITIVE_INFINITY);
     224    if (value !== Infinity)
     225        throw new Error("Math.ceil(Number.POSITIVE_INFINITY) = " + value);
     226    var value = Math.ceil(Number.NEGATIVE_INFINITY);
     227    if (value !== -Infinity)
     228        throw new Error("Math.ceil(Number.NEGATIVE_INFINITY) = " + value);
    229229    var value = Math.ceil(Math.E);
    230230    if (value !== 3)
  • trunk/Source/JavaScriptCore/tests/stress/math-clz32-basics.js

    r183358 r201656  
    9696        throw "mathClz32OnDouble(NaN) = " + value;
    9797
    98     var value = mathClz32OnDouble(Number.POSITIVE_INFINITI);
    99     if (value != 32)
    100         throw "mathClz32OnDouble(Number.POSITIVE_INFINITI) = " + value;
    101 
    102     var value = mathClz32OnDouble(Number.NEGATIVE_INFINITI);
    103     if (value != 32)
    104         throw "mathClz32OnDouble(Number.NEGATIVE_INFINITI) = " + value;
     98    var value = mathClz32OnDouble(Number.POSITIVE_INFINITY);
     99    if (value != 32)
     100        throw "mathClz32OnDouble(Number.POSITIVE_INFINITY) = " + value;
     101
     102    var value = mathClz32OnDouble(Number.NEGATIVE_INFINITY);
     103    if (value != 32)
     104        throw "mathClz32OnDouble(Number.NEGATIVE_INFINITY) = " + value;
    105105}
    106106noInline(testMathClz32OnDoubles);
     
    186186    if (value !== 32)
    187187        throw "Math.clz32(NaN) = " + value;
    188     var value = Math.clz32(Number.POSITIVE_INFINITI);
    189     if (value !== 32)
    190         throw "Math.clz32(Number.POSITIVE_INFINITI) = " + value;
    191     var value = Math.clz32(Number.NEGATIVE_INFINITI);
    192     if (value !== 32)
    193         throw "Math.clz32(Number.NEGATIVE_INFINITI) = " + value;
     188    var value = Math.clz32(Number.POSITIVE_INFINITY);
     189    if (value !== 32)
     190        throw "Math.clz32(Number.POSITIVE_INFINITY) = " + value;
     191    var value = Math.clz32(Number.NEGATIVE_INFINITY);
     192    if (value !== 32)
     193        throw "Math.clz32(Number.NEGATIVE_INFINITY) = " + value;
    194194    var value = Math.clz32(Math.E);
    195195    if (value !== 30)
  • trunk/Source/JavaScriptCore/tests/stress/math-floor-basics.js

    r197380 r201656  
    221221    if (value === value)
    222222        throw new Error("Math.floor(NaN) = " + value);
    223     var value = Math.floor(Number.POSITIVE_INFINITI);
    224     if (value === value)
    225         throw new Error("Math.floor(Number.POSITIVE_INFINITI) = " + value);
    226     var value = Math.floor(Number.NEGATIVE_INFINITI);
    227     if (value === value)
    228         throw new Error("Math.floor(Number.NEGATIVE_INFINITI) = " + value);
     223    var value = Math.floor(Number.POSITIVE_INFINITY);
     224    if (value !== Infinity)
     225        throw new Error("Math.floor(Number.POSITIVE_INFINITY) = " + value);
     226    var value = Math.floor(Number.NEGATIVE_INFINITY);
     227    if (value !== -Infinity)
     228        throw new Error("Math.floor(Number.NEGATIVE_INFINITY) = " + value);
    229229    var value = Math.floor(Math.E);
    230230    if (value !== 2)
  • trunk/Source/JavaScriptCore/tests/stress/math-round-basics.js

    r183963 r201656  
    221221    if (value === value)
    222222        throw "Math.round(NaN) = " + value;
    223     var value = Math.round(Number.POSITIVE_INFINITI);
    224     if (value === value)
    225         throw "Math.round(Number.POSITIVE_INFINITI) = " + value;
    226     var value = Math.round(Number.NEGATIVE_INFINITI);
    227     if (value === value)
    228         throw "Math.round(Number.NEGATIVE_INFINITI) = " + value;
     223    var value = Math.round(Number.POSITIVE_INFINITY);
     224    if (value !== Infinity)
     225        throw "Math.round(Number.POSITIVE_INFINITY) = " + value;
     226    var value = Math.round(Number.NEGATIVE_INFINITY);
     227    if (value !== -Infinity)
     228        throw "Math.round(Number.NEGATIVE_INFINITY) = " + value;
    229229    var value = Math.round(Math.E);
    230230    if (value !== 3)
  • trunk/Source/JavaScriptCore/tests/stress/math-trunc-basics.js

    r198981 r201656  
    220220    if (value === value)
    221221        throw new Error("Math.trunc(NaN) = " + value);
    222     var value = Math.trunc(Number.POSITIVE_INFINITI);
    223     if (value === value)
    224         throw new Error("Math.trunc(Number.POSITIVE_INFINITI) = " + value);
    225     var value = Math.trunc(Number.NEGATIVE_INFINITI);
    226     if (value === value)
    227         throw new Error("Math.trunc(Number.NEGATIVE_INFINITI) = " + value);
     222    var value = Math.trunc(Number.POSITIVE_INFINITY);
     223    if (value !== Infinity)
     224        throw new Error("Math.trunc(Number.POSITIVE_INFINITY) = " + value);
     225    var value = Math.trunc(Number.NEGATIVE_INFINITY);
     226    if (value !== -Infinity)
     227        throw new Error("Math.trunc(Number.NEGATIVE_INFINITY) = " + value);
    228228    var value = Math.trunc(Math.E);
    229229    if (value !== 2)
Note: See TracChangeset for help on using the changeset viewer.