| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 assertEquals(0.5, array_1[i]); | 62 assertEquals(0.5, array_1[i]); |
| 63 assertEquals(0.5, array_2[i]); | 63 assertEquals(0.5, array_2[i]); |
| 64 } else if (i == length - 5 && test_object) { | 64 } else if (i == length - 5 && test_object) { |
| 65 assertEquals('object', array_1[i]); | 65 assertEquals('object', array_1[i]); |
| 66 assertEquals('object', array_2[i]); | 66 assertEquals('object', array_2[i]); |
| 67 } else { | 67 } else { |
| 68 assertEquals(2*i+1, array_1[i]); | 68 assertEquals(2*i+1, array_1[i]); |
| 69 assertEquals(2*i+1, array_2[i]); | 69 assertEquals(2*i+1, array_2[i]); |
| 70 } | 70 } |
| 71 } | 71 } |
| 72 |
| 73 assertEquals(length, array_1.length); |
| 74 assertEquals(length, array_2.length); |
| 72 } | 75 } |
| 73 | 76 |
| 74 test(false, false, function(a,i,v){ a[i] = v; }, 100); | 77 test(false, false, function(a,i,v){ a[i] = v; }, 100); |
| 75 test(true, false, function(a,i,v){ a[i] = v; }, 100); | 78 test(true, false, function(a,i,v){ a[i] = v; }, 100); |
| 76 test(false, true, function(a,i,v){ a[i] = v; }, 100); | 79 test(false, true, function(a,i,v){ a[i] = v; }, 100); |
| 77 test(true, true, function(a,i,v){ a[i] = v; }, 100); | 80 test(true, true, function(a,i,v){ a[i] = v; }, 100); |
| 78 | 81 |
| 79 test(false, false, function(a,i,v){ a[i] = v; }, 10000); | 82 test(false, false, function(a,i,v){ a[i] = v; }, 10000); |
| 80 test(true, false, function(a,i,v){ a[i] = v; }, 10000); | 83 test(true, false, function(a,i,v){ a[i] = v; }, 10000); |
| 81 test(false, true, function(a,i,v){ a[i] = v; }, 10000); | 84 test(false, true, function(a,i,v){ a[i] = v; }, 10000); |
| 82 test(true, true, function(a,i,v){ a[i] = v; }, 10000); | 85 test(true, true, function(a,i,v){ a[i] = v; }, 10000); |
| 83 } else { | 86 } else { |
| 84 print("Test skipped because smi only arrays are not supported."); | 87 print("Test skipped because smi only arrays are not supported."); |
| 85 } | 88 } |
| OLD | NEW |