mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:52:44 +00:00 
			
		
		
		
	LibJS/Tests: Enable some now passing Array length tests
Now that serenity is 64 bit only these tests no longer need to be skipped :^)
This commit is contained in:
		
							parent
							
								
									fda619c7c2
								
							
						
					
					
						commit
						be280ff3e4
					
				
					 3 changed files with 3 additions and 9 deletions
				
			
		|  | @ -38,10 +38,7 @@ test("basic functionality", () => { | |||
|     expect(slice).toEqual(["hello", "friends", "serenity", 1]); | ||||
| }); | ||||
| 
 | ||||
| // FIXME: These tests are currently skipped because an invalid array length in this case is 2**32 or above.
 | ||||
| //        The codebase currently uses size_t for lengths, which is currently the same as u32 when building for Serenity.
 | ||||
| //        This means these lengths wrap around to 0, making the test not work correctly.
 | ||||
| test.skip("Invalid lengths", () => { | ||||
| test("Invalid lengths", () => { | ||||
|     var length = Math.pow(2, 32); | ||||
| 
 | ||||
|     var obj = { | ||||
|  |  | |||
|  | @ -48,10 +48,7 @@ test("basic functionality", () => { | |||
|     expect(removed).toEqual(["foo", "bar", "baz"]); | ||||
| }); | ||||
| 
 | ||||
| // FIXME: These tests are currently skipped because an invalid array length in this case is 2**32 or above.
 | ||||
| //        The codebase currently uses size_t for lengths, which is currently the same as u32 when building for Serenity.
 | ||||
| //        This means these lengths wrap around to 0, making the test not work correctly.
 | ||||
| test.skip("Invalid lengths", () => { | ||||
| test("Invalid lengths", () => { | ||||
|     var length = Math.pow(2, 32); | ||||
| 
 | ||||
|     var obj = { | ||||
|  |  | |||
|  | @ -91,7 +91,7 @@ describe("errors", () => { | |||
|         }).toThrowWithMessage(TypeError, "ToObject on null or undefined"); | ||||
|     }); | ||||
| 
 | ||||
|     test.skip("maximum array size exceeded", () => { | ||||
|     test("maximum array size exceeded", () => { | ||||
|         const a = { length: 2 ** 53 - 1 }; | ||||
|         expect(() => { | ||||
|             Array.prototype.toSpliced.call(a, 0, 0, "foo"); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Shannon Booth
						Shannon Booth