summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.1_T1.js52
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.1_T2.js70
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.2_T1.js71
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.2_T2.js100
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A10_T1.js19
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A10_T2.js19
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A11.js22
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T1.js57
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T2.js49
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T3.js37
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T4.js32
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1_T1.js37
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1_T2.js51
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A2.js12
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A3.js34
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A4.js36
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A5.js47
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A6_T1.js16
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A6_T2.js17
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A7.js25
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A8.js16
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A9_T3.js20
22 files changed, 839 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.1_T1.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.1_T1.js
new file mode 100644
index 000000000..036c32632
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.1_T1.js
@@ -0,0 +1,52 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A1.1_T1;
+* @section: 12.5;
+* @assertion: 0, null, undefined, false, empty string, NaN in expression is evaluated to false;
+* @description: Using "if" without "else" construction;
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+
+if(0)
+ $ERROR('#1: 0 in expression is evaluated to false ');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if(false)
+ $ERROR('#2: false in expression is evaluated to false ');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if(null)
+ $ERROR('#3: null in expression is evaluated to false ');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if(undefined)
+ $ERROR('#4: undefined in expression is evaluated to false ');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if("")
+ $ERROR('#5: empty string in expression is evaluated to false ');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#6
+if(NaN)
+ $ERROR('#5: NaN in expression is evaluated to false ');
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.1_T2.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.1_T2.js
new file mode 100644
index 000000000..361f581ce
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.1_T2.js
@@ -0,0 +1,70 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A1.1_T2;
+* @section: 12.5;
+* @assertion: 0, null, undefined, false, empty string, NaN in expression is evaluated to false;
+* @description: Using "if/else" construction;
+*/
+
+var c=0;
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if(0)
+ $ERROR('#1.1: 0 in expression is evaluated to false ');
+else
+ c++;
+if (c!=1) $ERROR('#1.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if(false)
+ $ERROR('#2.1: false in expression is evaluated to false ');
+else
+ c++;
+if (c!=2) $ERROR('#2.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if(null)
+ $ERROR('#3.1: null in expression is evaluated to false ');
+else
+ c++;
+if (c!=3) $ERROR('#3.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if(undefined)
+ $ERROR('#4.1: undefined in expression is evaluated to false ');
+else
+ c++;
+if (c!=4) $ERROR('#4.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if("")
+ $ERROR('#5.1: empty string in expression is evaluated to false ');
+else
+ c++;
+if (c!=5) $ERROR('#5.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#6
+if(NaN)
+ $ERROR('#6.1: NaN in expression is evaluated to false ');
+else
+ c++;
+if (c!=6) $ERROR('#6.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.2_T1.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.2_T1.js
new file mode 100644
index 000000000..2f7c8216f
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.2_T1.js
@@ -0,0 +1,71 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A1.2_T1;
+* @section: 12.5;
+* @assertion: 1, true, non-empty string and others in expression is evaluated to true when using operator "new";
+* @description: Using "if" without "else" construction;
+*/
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if(!(new Number(1)))
+ $ERROR('#1: new 1 in expression is evaluated to true');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if(!(new Boolean(true)))
+ $ERROR('#2: new true in expression is evaluated to true');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if(!(new String("1")))
+ $ERROR('#3: new "1" in expression is evaluated to true');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if(!(new String("A")))
+ $ERROR('#4: new "A" in expression is evaluated to true');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if(!(new Boolean(false)))
+ $ERROR('#2: new false in expression is evaluated to true ');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#6
+if(!(new Number(NaN)))
+ $ERROR('#6: new NaN in expression is evaluated to true ');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#7
+if(!(new Number(null)))
+ $ERROR('#7: new null in expression is evaluated to true ');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#8
+if(!(new String(undefined)))
+ $ERROR('#8: new undefined in expression is evaluated to true ');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#9
+if(!(new String("")))
+ $ERROR('#9: new empty string in expression is evaluated to true ');
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.2_T2.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.2_T2.js
new file mode 100644
index 000000000..e065a9131
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1.2_T2.js
@@ -0,0 +1,100 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A1.2_T2;
+* @section: 12.5;
+* @assertion: 1, true, non-empty string and others in expression is evaluated to true when using operator "new";
+* @description: Using "if/else" construction;
+*/
+
+var c=0;
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if(!(new Number(1)))
+ $ERROR('#1.1: new 1 in expression is evaluated to true');
+else
+ c++;
+if (c!=1) $ERROR('#1.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if(!(new Boolean(true)))
+ $ERROR('#2.1: new true in expression is evaluated to true');
+else
+ c++;
+if (c!=2) $ERROR('#2.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if(!(new String("1")))
+ $ERROR('#3.1: new "1" in expression is evaluated to true');
+else
+ c++;
+if (c!=3) $ERROR('#3.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if(!(new String("A")))
+ $ERROR('#4.1: new "A" in expression is evaluated to true');
+else
+ c++;
+if (c!=4) $ERROR('#4.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#5
+if(!(new Boolean(false)))
+ $ERROR('#5.1: new false in expression is evaluated to true ');
+else
+ c++;
+if (c!=5) $ERROR('#5.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#6
+if(!(new Number(NaN)))
+ $ERROR('#6.1: new NaN in expression is evaluated to true ');
+else
+ c++;
+if (c!=6) $ERROR('#6.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#7
+if(!(new Number(null)))
+ $ERROR('#7.1: new null in expression is evaluated to true ');
+else
+ c++;
+if (c!=7) $ERROR('#7.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#8
+if(!(new String(undefined)))
+ $ERROR('#8.1: new undefined in expression is evaluated to true ');
+else
+ c++;
+if (c!=8) $ERROR('#8.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#9
+if(!(new String("")))
+ $ERROR('#9.1: new empty string in expression is evaluated to true ');
+else
+ c++;
+if (c!=9) $ERROR('#9.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A10_T1.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A10_T1.js
new file mode 100644
index 000000000..ee61e2972
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A10_T1.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A10_T1;
+* @section: 12.5;
+* @assertion: Function expession inside the "if" expression is allowed;
+* @description: Using function expession(function __func(){return 0;}) inside the "if" expression ;
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+if(function __func(){return 0;}){
+ ;
+}else {
+ $ERROR('#1: Function expession inside the "if" expression is allowed');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A10_T2.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A10_T2.js
new file mode 100644
index 000000000..72586a770
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A10_T2.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A10_T2;
+* @section: 12.5;
+* @assertion: Function expession inside the "if" expression is allowed;
+* @description: Using function expession "function __func(){return 0;}()" within "if" expression;
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+if(function __func(){return 0;}()){
+ $ERROR('#1: Function expession inside the if expression is allowed');
+}else {
+ ;
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A11.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A11.js
new file mode 100644
index 000000000..6d845a985
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A11.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A11;
+* @section: 12.5;
+* @assertion: {} within the "if" expression is not allowed;
+* @description: Checking if execution of "if({1})" fails;
+* @negative;
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#
+if({1})
+ {
+ ;
+ }else
+ {
+ ;
+ }
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T1.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T1.js
new file mode 100644
index 000000000..aeaca7f85
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T1.js
@@ -0,0 +1,57 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A12_T1;
+* @section: 12.5;
+* @assertion: Embedded "if/else" constructions are allowed;
+* @description: Using embedded "if/else" into "if/else" constructions;
+*/
+
+//CHECK# 1
+if(true)
+ if (false)
+ $ERROR('#1.1: At embedded "if/else" constructions engine must select right branches');
+ else
+ ;
+else
+ if (true)
+ $ERROR('#1.2: At embedded "if/else" constructions engine must select right branches');
+ else
+ $ERROR('#1.3: At embedded "if/else" constructions engine must select right branches');
+
+//CHECK# 2
+if(true)
+ if (true)
+ ;
+ else
+ $ERROR('#2.1: At embedded "if/else" constructions engine must select right branches');
+else
+ if (true)
+ $ERROR('#2.2: At embedded "if/else" constructions engine must select right branches');
+ else
+ $ERROR('#2.3: At embedded "if/else" constructions engine must select right branches');
+
+//CHECK# 3
+if(false)
+ if (true)
+ $ERROR('#3.1: At embedded "if/else" constructions engine must select right branches');
+ else
+ $ERROR('#3.2: At embedded "if/else" constructions engine must select right branches');
+else
+ if (true)
+ ;
+ else
+ $ERROR('#3.3: At embedded "if/else" constructions engine must select right branches');
+
+//CHECK# 4
+if(false)
+ if (true)
+ $ERROR('#4.1: At embedded "if/else" constructions engine must select right branches');
+ else
+ $ERROR('#4.2: At embedded "if/else" constructions engine must select right branches');
+else
+ if (false)
+ $ERROR('#4.3: At embedded "if/else" constructions engine must select right branches');
+ else
+ ;
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T2.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T2.js
new file mode 100644
index 000000000..9c3e323c1
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T2.js
@@ -0,0 +1,49 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A12_T2;
+* @section: 12.5;
+* @assertion: Embedded "if/else" constructions are allowed;
+* @description: Using embedded "if" into "if/else" constructions;
+*/
+
+//CHECK# 1
+if(true){
+ if (false)
+ $ERROR('#1.1: At embedded "if/else" constructions engine must select right branches');
+}
+else{
+ if (true)
+ $ERROR('#1.2: At embedded "if/else" constructions engine must select right branches');
+}
+
+//CHECK# 2
+if(true){
+ if (true)
+ ;
+}
+else{
+ if (true)
+ $ERROR('#2.2: At embedded "if/else" constructions engine must select right branches');
+}
+
+//CHECK# 3
+if(false){
+ if (true)
+ $ERROR('#3.1: At embedded "if/else" constructions engine must select right branches');
+}
+else{
+ if (true)
+ ;
+}
+
+//CHECK# 4
+if(false){
+ if (true)
+ $ERROR('#4.1: At embedded "if/else" constructions engine must select right branches');
+}
+else{
+ if (false)
+ $ERROR('#4.3: At embedded "if/else" constructions engine must select right branches');
+}
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T3.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T3.js
new file mode 100644
index 000000000..4d1c52897
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T3.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A12_T3;
+* @section: 12.5;
+* @assertion: Embedded "if/else" constructions are allowed;
+* @description: Using embedded "if/else" into "if" without "else" constructions;
+*/
+
+//CHECK# 1
+if(true)
+ if (false)
+ $ERROR('#1.1: At embedded "if/else" constructions engine must select right branches');
+ else
+ ;
+
+//CHECK# 2
+if(true)
+ if (true)
+ ;
+ else
+ $ERROR('#2.1: At embedded "if/else" constructions engine must select right branches');
+
+//CHECK# 3
+if(false)
+ if (true)
+ $ERROR('#3.1: At embedded "if/else" constructions engine must select right branches');
+ else
+ $ERROR('#3.2: At embedded "if/else" constructions engine must select right branches');
+
+//CHECK# 4
+if(false)
+ if (true)
+ $ERROR('#4.1: At embedded "if/else" constructions engine must select right branches');
+ else
+ $ERROR('#4.2: At embedded "if/else" constructions engine must select right branches');
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T4.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T4.js
new file mode 100644
index 000000000..548ff16d2
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A12_T4.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A12_T4;
+* @section: 12.5;
+* @assertion: Embedded "if/else" constructions are allowed;
+* @description: Using embedded "if" into "if" constructions;
+*/
+
+//CHECK# 1
+if(true)
+ if (false)
+ $ERROR('#1.1: At embedded "if/else" constructions engine must select right branches');
+
+//CHECK# 2
+var c=0;
+if(true)
+ if (true)
+ c=2;
+if (c!==2)
+ $ERROR('#2: At embedded "if/else" constructions engine must select right branches');
+
+//CHECK# 3
+if(false)
+ if (true)
+ $ERROR('#3.1: At embedded "if/else" constructions engine must select right branches');
+
+//CHECK# 4
+if(false)
+ if (true)
+ $ERROR('#4.1: At embedded "if/else" constructions engine must select right branches');
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1_T1.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1_T1.js
new file mode 100644
index 000000000..62e09c10f
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1_T1.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A1_T1;
+* @section: 12.5;
+* @assertion: 1, true, non-empty string in expression is evaluated to true;
+* @description: Using "if" without "else" construction;
+*/
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if(!(1))
+ $ERROR('#1: 1 in expression is evaluated to true');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if(!(true))
+ $ERROR('#2: true in expression is evaluated to true');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if(!("1"))
+ $ERROR('#3: "1" in expression is evaluated to true');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if(!("A"))
+ $ERROR('#4: "A" in expression is evaluated to true');
+//
+//////////////////////////////////////////////////////////////////////////////
+
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1_T2.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1_T2.js
new file mode 100644
index 000000000..f1c8e6444
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A1_T2.js
@@ -0,0 +1,51 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A1_T2;
+* @section: 12.5;
+* @assertion: 1, true, non-empty string in expression is evaluated to true;
+* @description: Using "if/else" construction;
+*/
+
+var c=0;
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if(!(1))
+ $ERROR('#1.1: 1 in expression is evaluated to true');
+else
+ c++;
+if (c!=1) $ERROR('#1.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if(!(true))
+ $ERROR('#2.1: true in expression is evaluated to true');
+else
+ c++;
+if (c!=2) $ERROR('#2.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if(!("1"))
+ $ERROR('#3.1: "1" in expression is evaluated to true');
+else
+ c++;
+if (c!=3) $ERROR('#3.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if(!("A"))
+ $ERROR('#4.1: "A" in expression is evaluated to true');
+else
+ c++;
+if (c!=4) $ERROR('#4.2: else branch don`t execute');
+//
+//////////////////////////////////////////////////////////////////////////////
+
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A2.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A2.js
new file mode 100644
index 000000000..9430d046e
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A2.js
@@ -0,0 +1,12 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A2;
+* @section: 12.5;
+* @assertion: In the "if" Statement eval in Expression is admitted;
+* @description: Checking by using eval "eval("true")";
+* @negative;
+*/
+
+if (eval("true")) $FAIL('#1: In the "if" Statement eval as Expression is admitted');
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A3.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A3.js
new file mode 100644
index 000000000..58d20c09d
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A3.js
@@ -0,0 +1,34 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A3;
+* @section: 12.5;
+* @assertion: When the production "IfStatement: if ( Expression ) Statement else Statement" is evaluated, Expression is evaluated first;
+* @description: The Expression is "(function(){throw 1})()";
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ if ((function(){throw 1})()) abracadabra
+} catch (e) {
+ if (e !== 1) {
+ $ERROR('#1: Exception === 1. Actual: Exception ==='+ e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+try {
+ if ((function(){throw 1})()) abracadabra; else blablachat;
+} catch (e) {
+ if (e !== 1) {
+ $ERROR('#2: Exception === 1. Actual: Exception ==='+ e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A4.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A4.js
new file mode 100644
index 000000000..985451e65
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A4.js
@@ -0,0 +1,36 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A4;
+* @section: 12.5;
+* @assertion: When the production "IfStatement: if ( Expression ) Statement else Statement" is evaluated, Statement(s) is(are) evaluated second;
+* @description: The first statement is "(function(){throw "instatement"})()";
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ if (true) (function(){throw "instatement"})();
+ $FAIL("#1 failed")
+} catch (e) {
+ if (e !== "instatement") {
+ $ERROR('#1: Exception === "instatement". Actual: Exception ==='+ e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+try {
+ if (false) (function(){throw "truebranch"})(); (function(){throw "missbranch"})();
+ $FAIL("#2 failed")
+} catch (e) {
+ if (e !== "missbranch") {
+ $ERROR('#2: Exception === "missbranch". Actual: Exception ==='+ e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A5.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A5.js
new file mode 100644
index 000000000..6e7c29d1c
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A5.js
@@ -0,0 +1,47 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A5;
+* @section: 12.5;
+* @assertion: FunctionDeclaration inside the "if" Expression is evaluated as true and function will not be declarated;
+* @description: The "if" Expression is "function __func(){throw "FunctionExpression";}";
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ __func=__func;
+ $ERROR('#1: "__func=__func" lead to throwing exception');
+} catch (e) {
+ ;
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+try {
+ if(function __func(){throw "FunctionExpression";}) (function(){throw "TrueBranch"})(); else (function(){"MissBranch"})();
+} catch (e) {
+ if (e !== "TrueBranch") {
+ $ERROR('#2: Exception ==="TrueBranch". Actual: Exception ==='+ e);
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+try {
+ __func=__func;
+ $ERROR('#3: "__func=__func" lead to throwing exception');
+} catch (e) {
+ ;
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A6_T1.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A6_T1.js
new file mode 100644
index 000000000..8915bdc6c
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A6_T1.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A6_T1;
+* @section: 12.5;
+* @assertion: In the If statement expression must be enclosed in braces;
+* @description: Checking if execution of "if true" fails;
+* @negative;
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if true;
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A6_T2.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A6_T2.js
new file mode 100644
index 000000000..aa1488c40
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A6_T2.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A6_T2;
+* @section: 12.5;
+* @assertion: In the If statement expression must be enclosed in braces;
+* @description: Checking if execution of "if false" fails;
+* @negative;
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if false;
+//
+//////////////////////////////////////////////////////////////////////////////
+
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A7.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A7.js
new file mode 100644
index 000000000..7d213f3c6
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A7.js
@@ -0,0 +1,25 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A7;
+* @section: 12.5;
+* @assertion: In the "if" statement empty statement is allowed and is evaluated to "undefined";
+* @description: Checking by using eval "eval("if(1);"))";
+*/
+
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ var __evaluated = eval("if(1);");
+ if (__evaluated !== undefined) {
+ $ERROR('#1: __evaluated === undefined. Actual: __evaluated ==='+ __evaluated );
+ }
+
+} catch (e) {
+ $ERROR('#1.1: "__evaluated = eval("if(1);")" does not lead to throwing exception');
+
+}
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A8.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A8.js
new file mode 100644
index 000000000..67db448c0
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A8.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A8;
+* @section: 12.5;
+* @assertion: In the "if" Statement empty expression is not allowed;
+* @description: Checking if execution of "if()" fails;
+* @negative;
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if();
+//
+//////////////////////////////////////////////////////////////////////////////
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A9_T3.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A9_T3.js
new file mode 100644
index 000000000..104f3a793
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.5_The_if_Statement/S12.5_A9_T3.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.5_A9_T3;
+* @section: 12.5;
+* @assertion: Function declaration within an "if" statement is not allowed;
+* @description: Declaring function within an "if" statement that is declared within the function declaration;
+* @negative;
+*/
+
+function(){
+
+if (true) {
+ function __func(){};
+} else {
+ function __func(){};
+}
+
+};