mirror of
				https://github.com/tc39/test262.git
				synced 2025-10-31 11:44:31 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			372 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			372 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| function shouldBe(actual, expected)
 | |
| {
 | |
|     if (actual !== expected)
 | |
|         throw new Error('bad value: ' + actual);
 | |
| }
 | |
| noInline(shouldBe);
 | |
| 
 | |
| function test()
 | |
| {
 | |
|     return Symbol();
 | |
| }
 | |
| noInline(test);
 | |
| 
 | |
| var set = new Set;
 | |
| for (var i = 0; i < 1e4; ++i) {
 | |
|     var symbol = test();
 | |
|     set.add(symbol);
 | |
|     shouldBe(set.size, i + 1);
 | |
|     shouldBe(symbol.description, undefined);
 | |
| }
 |