mirror of
				https://github.com/tc39/test262.git
				synced 2025-10-31 19:53:50 +01:00 
			
		
		
		
	This CL adds three tests to staging directory of test262. Bug: v8:13556 Change-Id: Id6e468a0fa29528350a10c94e9dd19c2835788e8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5055866 Reviewed-by: Liviu Rau <liviurau@chromium.org> Commit-Queue: Liviu Rau <liviurau@google.com> Cr-Commit-Position: refs/heads/main@{#91139}
		
			
				
	
	
		
			26 lines
		
	
	
		
			548 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			548 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| // Copyright (C) 2023 the V8 project authors. All rights reserved.
 | |
| // This code is governed by the BSD license found in the LICENSE file.
 | |
| /*---
 | |
| description: Test isSubsetOf set method receiver is cleared.
 | |
| features: [set-methods]
 | |
| ---*/
 | |
| 
 | |
| const firstSet = new Set();
 | |
| firstSet.add(42);
 | |
| firstSet.add(43);
 | |
| 
 | |
| const otherSet = new Set();
 | |
| otherSet.add(42);
 | |
| otherSet.add(43);
 | |
| otherSet.add(47);
 | |
| 
 | |
| Object.defineProperty(otherSet, 'size', {
 | |
|   get: function() {
 | |
|     firstSet.clear();
 | |
|     return 3;
 | |
|   },
 | |
| 
 | |
| });
 | |
| 
 | |
| assert.sameValue(firstSet.isSubsetOf(otherSet), true);
 |