mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 05:10:57 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			403 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			403 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| load("test-common.js");
 | |
| 
 | |
| try {
 | |
|     var x = 1;
 | |
| 
 | |
|     assert(x === 1 ? true : false);
 | |
|     assert((x ? x : 0) === x);
 | |
|     assert(1 < 2 ? (true) : (false));
 | |
|     assert((0 ? 1 : 1 ? 10 : 20) === 10);
 | |
|     assert((0 ? 1 ? 1 : 10 : 20) === 20);
 | |
| 
 | |
|     var o = {};
 | |
|     o.f = true;
 | |
|     assert(o.f ? true : false);
 | |
| 
 | |
|     assert(1 ? o.f : null);
 | |
| 
 | |
|     console.log("PASS");
 | |
| } catch (e) {
 | |
|     console.log("FAIL: " + e);
 | |
| }
 | 
