mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-04 07:10:57 +00:00 
			
		
		
		
	Switch the LibJS test suite to use the native assert implementation surfaced inside the js repl when it's launched in test mode.
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			764 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			764 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
try {
 | 
						|
    assert(Infinity + "" === "Infinity");
 | 
						|
    assert(-Infinity + "" === "-Infinity");
 | 
						|
    assert(Infinity === Infinity);
 | 
						|
    assert(Infinity - 1 === Infinity);
 | 
						|
    assert(Infinity + 1 === Infinity);
 | 
						|
    assert(-Infinity === -Infinity);
 | 
						|
    assert(-Infinity - 1 === -Infinity);
 | 
						|
    assert(-Infinity + 1 === -Infinity);
 | 
						|
    assert(1 / Infinity === 0);
 | 
						|
    assert(1 / -Infinity === 0);
 | 
						|
    assert(1 / 0 === Infinity);
 | 
						|
    assert(-1 / 0 === -Infinity);
 | 
						|
    assert(-100 < Infinity);
 | 
						|
    assert(0 < Infinity);
 | 
						|
    assert(100 < Infinity);
 | 
						|
    assert(-Infinity < Infinity);
 | 
						|
    assert(-100 > -Infinity);
 | 
						|
    assert(0 > -Infinity);
 | 
						|
    assert(100 > -Infinity);
 | 
						|
    assert(Infinity > -Infinity);
 | 
						|
    console.log("PASS");
 | 
						|
} catch (e) {
 | 
						|
    console.log("FAIL: " + e);
 | 
						|
}
 |