emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master a0ccc5c 162/271: Improve and pass catch test.


From: Jackson Ray Hamilton
Subject: [elpa] master a0ccc5c 162/271: Improve and pass catch test.
Date: Thu, 05 Feb 2015 18:30:48 +0000

branch: master
commit a0ccc5cab010acae17180819492739a477a6f2ce
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>

    Improve and pass catch test.
---
 test/context-coloring-test.el |   20 +++++++++-----------
 test/fixtures/catch.js        |    9 ++++++++-
 2 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el
index 1218f22..1a4e24b 100644
--- a/test/context-coloring-test.el
+++ b/test/context-coloring-test.el
@@ -72,7 +72,7 @@ FIXTURE."
    "./fixtures/function-scopes.js"
    (js-mode)
    (context-coloring-mode)
-   (sleep-for .1) ; Wait for asynchronous coloring.
+   (sleep-for .25) ; Wait for asynchronous coloring.
    (context-coloring-test-function-scopes)))
 
 (ert-deftest context-coloring-test-js2-mode-function-scopes ()
@@ -102,15 +102,13 @@ FIXTURE."
    "./fixtures/catch.js"
    (js2-mode)
    (context-coloring-mode)
-   (context-coloring-test-region-level-p 1 8 0)
-   (context-coloring-test-region-level-p 8 20 1)))
-
-(ert-deftest context-coloring-test-js2-mode-complexity ()
-  (context-coloring-test-js2-with-fixture
-   "../benchmark/fixtures/mkdirp-0.5.0.js"
-   (js2-mode)
-   (context-coloring-mode)
-   ;; Don't error.
-   ))
+   (context-coloring-test-region-level-p 20 27 1)
+   (context-coloring-test-region-level-p 27 51 2)
+   (context-coloring-test-region-level-p 51 52 1)
+   (context-coloring-test-region-level-p 52 73 2)
+   (context-coloring-test-region-level-p 73 101 3)
+   (context-coloring-test-region-level-p 101 102 1)
+   (context-coloring-test-region-level-p 102 117 3)
+   (context-coloring-test-region-level-p 117 123 2)))
 
 (provide 'context-coloring-test)
diff --git a/test/fixtures/catch.js b/test/fixtures/catch.js
index 0ead890..a542ce9 100644
--- a/test/fixtures/catch.js
+++ b/test/fixtures/catch.js
@@ -1 +1,8 @@
-try {} catch (e) {}
+(function () {
+    try {} catch (e) {
+        var a = e;
+        try {} catch (e) {
+            var a = e;
+        }
+    }
+}());



reply via email to

[Prev in Thread] Current Thread [Next in Thread]