Skip to content

Instantly share code, notes, and snippets.

@pedrodelgallego
Created June 7, 2010 13:24
Show Gist options
  • Select an option

  • Save pedrodelgallego/428661 to your computer and use it in GitHub Desktop.

Select an option

Save pedrodelgallego/428661 to your computer and use it in GitHub Desktop.
/**
* @name: S8.7.2_A3_T1;
* @section: 8.7.2;
* @assertion: x = 1 calls PutValue(V,W) setting the new value of V
* @description: Execute x = 1, that calls PutValue(V,W) where V is an unresolved
* reference in a strict mode scope.
* A ReferenceError should be throw
*/
"use strict";
//CHECK#1
try {
x = 1;
$ERROR('#1.1: this.x = 1 throw ReferenceError. Actual: ' + (this.x = 1));
}
catch (e) {
if ((e instanceof ReferenceError) !== true) {
$ERROR('#1.2: this.x = 1 throw ReferenceError. Actual: ' + (e));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment