mirror of
				https://github.com/tc39/test262.git
				synced 2025-10-31 11:44:31 +01:00 
			
		
		
		
	* [javascriptcore-test262-automation] changes from git@github.com:WebKit/webkit.git at sha 949e26452cfa153a7f4afe593da97e2fe9e1b706 on Tue Jul 03 2018 14:35:15 GMT-0400 (Eastern Daylight Time)
		
			
				
	
	
		
			23 lines
		
	
	
		
			401 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			401 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| //@ defaultRun; runNoCJITNoASO
 | |
| 
 | |
| function foo(a, b) {
 | |
|     return a.f / b.f;
 | |
| }
 | |
| 
 | |
| noInline(foo);
 | |
| 
 | |
| function test(a, b, e) {
 | |
|     var result = foo({f:a}, {f:b});
 | |
|     if (result != e)
 | |
|         throw "Error: " + a + " / " + b + " should be " + e + " but was " + result;
 | |
| }
 | |
| 
 | |
| for (var i = 1; i < 101; ++i)
 | |
|     test(i * 2, i, 2);
 | |
| 
 | |
| test(9, 3, 3);
 | |
| test(12, 4, 3);
 | |
| test(-32, 8, -4);
 | |
| test(-21, 7, -3);
 | |
| test(7, 2, 3.5);
 |