| Index: test/intl/number-format/format-is-bound.js
|
| diff --git a/test/mjsunit/compiler/osr-nested.js b/test/intl/number-format/format-is-bound.js
|
| similarity index 82%
|
| copy from test/mjsunit/compiler/osr-nested.js
|
| copy to test/intl/number-format/format-is-bound.js
|
| index 4bdb0828ca2272332701c579bcbf9952cf43e6a4..b24c2ed0cab91913da7ae0e1b416d521a530bcea 100644
|
| --- a/test/mjsunit/compiler/osr-nested.js
|
| +++ b/test/intl/number-format/format-is-bound.js
|
| @@ -25,22 +25,15 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -// Flags: --use-osr
|
| +// Create default NumberFormat.
|
| +var nf = new Intl.NumberFormat();
|
|
|
| -function f() {
|
| - var sum = 0;
|
| - for (var i = 0; i < 10; i++) {
|
| - for (var j = 0; j < 100000; j++) {
|
| - var x = i + 2;
|
| - var y = x + 5;
|
| - var z = y + 3;
|
| - sum += z;
|
| - }
|
| - }
|
| - return sum;
|
| -}
|
| +// Array we want to iterate, actual numbers are not important.
|
| +var numberArray = [1, 2, 3];
|
|
|
| +// It shouldn't throw.
|
| +// The format() method should be properly bound to the nf object.
|
| +numberArray.forEach(nf.format);
|
|
|
| -assertEquals(14500000, f());
|
| -assertEquals(14500000, f());
|
| -assertEquals(14500000, f());
|
| +// Formatting a number should work in a direct call.
|
| +nf.format(12345);
|
|
|