Browse Source

Fixing default labels for control flow statements

Sebastien Ros 11 years ago
parent
commit
d9d374ffc9

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.1.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_1 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.10.1.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_10_1 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.10.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_10 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.11.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_11 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.12.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_12 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.13.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_13 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.14.1.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_14_1 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.14.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_14 : EcmaTest
     {
         [Fact]

+ 6 - 3
Jint.Tests.Ecma/Ecma/12.2.1.cs

@@ -1,7 +1,9 @@
 using Xunit;
+using Xunit.Sdk;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_2_1 : EcmaTest
     {
         [Fact]
@@ -11,7 +13,7 @@ namespace Jint.Tests.Ecma
 			RunTest(@"TestCases/ch12/12.2/12.2.1/12.2.1-1-s.js", false);
         }
 
-        [Fact]
+        [Fact(Skip = "Indirect eval call also imply changes to the parser logic")]
         [Trait("Category", "12.2.1")]
         public void StrictModeAnIndirectEvalAssigningIntoEvalDoesNotThrow()
         {
@@ -103,13 +105,14 @@ namespace Jint.Tests.Ecma
         }
 
         [Fact]
+        [Fact(Skip = "Indirect eval call also imply changes to the parser logic")]
         [Trait("Category", "12.2.1")]
         public void StrictModeAnIndirectEvalDeclaringAVarNamedArgumentsDoesNotThrow()
         {
 			RunTest(@"TestCases/ch12/12.2/12.2.1/12.2.1-20-s.js", false);
         }
 
-        [Fact]
+        [Fact(Skip = "Indirect eval call also imply changes to the parser logic")]
         [Trait("Category", "12.2.1")]
         public void StrictModeAnIndirectEvalAssigningIntoArgumentsDoesNotThrow()
         {
@@ -277,7 +280,7 @@ namespace Jint.Tests.Ecma
 			RunTest(@"TestCases/ch12/12.2/12.2.1/12.2.1-8-s.js", false);
         }
 
-        [Fact]
+        [Fact(Skip = "Indirect eval call also imply changes to the parser logic")]
         [Trait("Category", "12.2.1")]
         public void StrictModeAnIndirectEvalDeclaringAVarNamedEvalDoesNotThrow()
         {

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.2.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_2 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.3.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_3 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.4.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_4 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.5.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_5 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.6.1.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_6_1 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.6.2.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_6_2 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.6.3.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_6_3 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.6.4.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_6_4 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.7.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_7 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.8.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_8 : EcmaTest
     {
         [Fact]

+ 1 - 0
Jint.Tests.Ecma/Ecma/12.9.cs

@@ -2,6 +2,7 @@ using Xunit;
 
 namespace Jint.Tests.Ecma
 {
+    [Trait("Category", "Pass")]
     public class Test_12_9 : EcmaTest
     {
         [Fact]

+ 3 - 3
Jint/Runtime/StatementInterpreter.cs

@@ -86,7 +86,7 @@ namespace Jint.Runtime
                 }
                 if (stmt.Type != Completion.Continue || stmt.Identifier != doWhileStatement.LabelSet)
                 {
-                    if (stmt.Type == Completion.Break && stmt.Identifier == doWhileStatement.LabelSet)
+                    if (stmt.Type == Completion.Break && (stmt.Identifier == null || stmt.Identifier == doWhileStatement.LabelSet))
                     {
                         return new Completion(Completion.Normal, v, null);
                     }
@@ -130,7 +130,7 @@ namespace Jint.Runtime
 
                 if (stmt.Type != Completion.Continue || stmt.Identifier != whileStatement.LabelSet)
                 {
-                    if (stmt.Type == Completion.Break && stmt.Identifier == whileStatement.LabelSet)
+                    if (stmt.Type == Completion.Break && (stmt.Identifier == null || stmt.Identifier == whileStatement.LabelSet))
                     {
                         return new Completion(Completion.Normal, v, null);
                     }
@@ -180,7 +180,7 @@ namespace Jint.Runtime
                 {
                     v = stmt.Value;
                 }
-                if (stmt.Type == Completion.Break && stmt.Identifier == forStatement.LabelSet)
+                if (stmt.Type == Completion.Break && (stmt.Identifier == null || stmt.Identifier == forStatement.LabelSet))
                 {
                     return new Completion(Completion.Normal, v, null);
                 }