aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite/sputnik_converted/08_Types/8.4_The_String_Type/S8.4_A12.js
blob: 0d72fa93891b07c2c15ef0194ed840573323c62e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
* @name: S8.4_A12;
* @section: 8.4, 7.8.4;
* @assertion: Assignment to string literal calls String constructor;
* @description: Check constructor of simple assigned variable;
*/


// Converted for Test262 from original Sputnik source

ES5Harness.registerTest( {
id: "S8.4_A12",

path: "TestCases/08_Types/8.4_The_String_Type/S8.4_A12.js",

assertion: "Assignment to string literal calls String constructor",

description: "Check constructor of simple assigned variable",

test: function testcase() {
   //////////////////////////////////////////////////////////////////////////////
//CHECK#1
var str = "rock'n'roll";
if (str.constructor !== String){
  $ERROR('#1: var str = "rock\'n\'roll"; str.constructor === String. Actual: ' + (str.constructor));
}
//
//////////////////////////////////////////////////////////////////////////////

 }
});