This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @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 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict" | |
var str = ""; | |
var strObj_ = new String(); | |
//////////////////////////////////////////////////////////// | |
// CHECK#6 | |
if (str === strObj_){ | |
$ERROR('#6: objects of str=""; and strObj=new String(); are not equal'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
(require racket/match) | |
;; ------------------------------------- Define booleans | |
(define the-false-value #f) | |
;; ------------------------------------- Data Types Predicates. | |
(define (boolean? x ) | |
(or (eq? x the-false-value) (eq? x (not the-false-value)) )) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
(require rackunit "kernel.rkt") | |
(define (test description test-case result) | |
(display ".") | |
(check-equal? (evaluate test-case) result description)) | |
;; Test Simple data types. | |
(test "the false value" #f #f) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (isNaN(parseInt("\u000B")) !== true) { | |
print('parseInt("\\u000B") === Not-a-Number. Actual: ' + (parseInt("\u000B"))); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CHECK#5 | |
if (!(isFinite("string") === false)) { | |
$ERROR('#5: "string" === Not-a-Finite. Actual: ' + ("string")); | |
} | |
// CHECK#1 | |
if (!(isFinite({}) === false)) { | |
$ERROR('#1: {} === Not-a-Finite. Actual: ' + ({})); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var obj = {}; | |
obj.push = Array.prototype.push; | |
obj.length = 4294967295; | |
//CHECK#1 | |
var push = obj.push("x", "y", "z"); | |
if (push !== 4294967298) { | |
$ERROR('#1: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push("x", "y", "z") === 4294967298. Actual: ' + (push)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.prototype[1] = 1; | |
var x = [0]; | |
x.length = 2; | |
var arr = x.concat(); | |
//CHECK#1 | |
if (arr[0] !== 0) { | |
$ERROR('#1: Array.prototype[1] = 1; x = [0]; x.length = 2; var arr = x.concat(); arr[0] === 0. Actual: ' + (arr[0])); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//CHECK#1 | |
try { | |
var x = []; | |
x.length = NaN; | |
$ERROR('#1.1: x = []; x.length = NaN throw RangeError. Actual: x.length === ' + (x.length)); | |
} catch(e) { | |
if ((e instanceof RangeError) !== true) { | |
$ERROR('#1.2: x = []; x.length = NaN throw RangeError. Actual: ' + (e)); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Running sputniktests from the command line. | |
$> ./tools/sputnik.py --command ~/gsoc/2010/besen/shell/BESENShellLinux386 | |
Traceback (most recent call last): | |
File "./tools/sputnik.py", line 515, in <module> | |
Main() | |
File "./tools/sputnik.py", line 510, in Main | |
options.full_summary) | |
File "./tools/sputnik.py", line 412, in Run |