mirror of
				https://github.com/tc39/test262.git
				synced 2025-11-03 21:24:30 +01:00 
			
		
		
		
	This function is equivalent to `$ERROR` (which is automatically included in test environments). Remove the harness file that defines the function, remove references to the file from test `includes` lists, and update scripts to instead invoke the `$ERROR` function.
		
			
				
	
	
		
			28 lines
		
	
	
		
			940 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			940 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
// Copyright 2009 the Sputnik authors.  All rights reserved.
 | 
						|
// This code is governed by the BSD license found in the LICENSE file.
 | 
						|
 | 
						|
/*---
 | 
						|
info: >
 | 
						|
    The length property of encodeURIComponent does not have the attribute
 | 
						|
    DontDelete
 | 
						|
es5id: 15.1.3.4_A5.2
 | 
						|
description: Checking use hasOwnProperty, delete
 | 
						|
---*/
 | 
						|
 | 
						|
//CHECK#1
 | 
						|
if (encodeURIComponent.hasOwnProperty('length') !== true) {
 | 
						|
  $ERROR('#1: encodeURIComponent.hasOwnProperty(\'length\') === true. Actual: ' + (encodeURIComponent.hasOwnProperty('length')));
 | 
						|
}
 | 
						|
 | 
						|
delete encodeURIComponent.length;
 | 
						|
 | 
						|
//CHECK#2
 | 
						|
if (encodeURIComponent.hasOwnProperty('length') !== false) {
 | 
						|
  $ERROR('#2: delete encodeURIComponent.length; encodeURIComponent.hasOwnProperty(\'length\') === false. Actual: ' + (encodeURIComponent.hasOwnProperty('length')));
 | 
						|
}
 | 
						|
 | 
						|
//CHECK#3
 | 
						|
if (encodeURIComponent.length === undefined) {
 | 
						|
  $ERROR('#3: delete encodeURIComponent.length; encodeURIComponent.length !== undefined');
 | 
						|
}
 |