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

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

[elpa] master f1badee 18/31: Replace (equal nil ...) with (null ...)


From: Dmitry Gutov
Subject: [elpa] master f1badee 18/31: Replace (equal nil ...) with (null ...)
Date: Fri, 21 Jul 2017 09:04:57 -0400 (EDT)

branch: master
commit f1badeea1891ba307dab1a9072143499dedb3913
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Replace (equal nil ...) with (null ...)
---
 tests/parser.el | 74 ++++++++++++++++++++++++++++-----------------------------
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/tests/parser.el b/tests/parser.el
index 7f9d392..65cb209 100644
--- a/tests/parser.el
+++ b/tests/parser.el
@@ -1,6 +1,6 @@
 ;;; tests/parser.el --- Some tests for js2-mode.
 
-;; Copyright (C) 2009, 2011-2016  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011-2017  Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -589,7 +589,7 @@ the test."
   (js2-init-scanner)
   (should (js2-match-token js2-LC))
   (let ((imports (js2-parse-export-bindings)))
-    (should (not (equal nil imports)))
+    (should (not (null imports)))
     (should (= 2 (length imports)))
     (let ((first (nth 0 imports))
           (second (nth 1 imports)))
@@ -617,7 +617,7 @@ the test."
   (js2-init-scanner)
   (should (js2-match-token js2-MUL))
   (let ((namespace-import (js2-parse-namespace-import)))
-    (should (not (equal nil namespace-import)))
+    (should (not (null namespace-import)))
     (should (js2-namespace-import-node-p namespace-import))
     (should (= 1 (js2-node-pos namespace-import)))
     (should (equal 8 (js2-node-len namespace-import)))
@@ -628,7 +628,7 @@ the test."
 (js2-deftest parse-from-clause "from 'foo/bar';"
   (js2-init-scanner)
   (let ((from (js2-parse-from-clause)))
-    (should (not (equal nil from)))
+    (should (not (null from)))
     (should (= 1 (js2-node-pos from)))
     (should (= 14 (js2-node-len from)))
     (should (equal "foo/bar" (js2-from-clause-node-module-id from)))))
@@ -637,25 +637,25 @@ the test."
   (js2-init-scanner)
   (should (js2-match-token js2-IMPORT))
   (let ((import (js2-parse-import)))
-    (should (not (equal nil import)))
+    (should (not (null import)))
     (should (= 1 (js2-node-pos import)))
     (should (= 16 (js2-node-len import)))
-    (should (equal nil (js2-import-node-import import)))
-    (should (equal nil (js2-import-node-from import)))))
+    (should (null (js2-import-node-import import)))
+    (should (null (js2-import-node-from import)))))
 
 (js2-deftest parse-imported-default-binding "import theDefault from 'src/lib'"
   (js2-push-scope (make-js2-scope :pos 0))
   (js2-init-scanner)
   (should (js2-match-token js2-IMPORT))
   (let ((import-node (js2-parse-import)))
-    (should (not (equal nil import-node)))
+    (should (not (null import-node)))
     (should (equal "src/lib" (js2-import-node-module-id import-node)))
     (let ((import (js2-import-node-import import-node)))
-      (should (not (equal nil import)))
-      (should (equal nil (js2-import-clause-node-namespace-import import)))
-      (should (equal nil (js2-import-clause-node-named-imports import)))
+      (should (not (null import)))
+      (should (null (js2-import-clause-node-namespace-import import)))
+      (should (null (js2-import-clause-node-named-imports import)))
       (let ((default (js2-import-clause-node-default-binding import)))
-        (should (not (equal nil default)))
+        (should (not (null default)))
         (should (js2-export-binding-node-p default))
         (should (equal "theDefault" (js2-name-node-name 
(js2-export-binding-node-extern-name default)))))))
   (should (js2-scope-get-symbol js2-current-scope "theDefault")))
@@ -665,14 +665,14 @@ the test."
   (js2-init-scanner)
   (should (js2-match-token js2-IMPORT))
   (let ((import-node (js2-parse-import)))
-    (should (not (equal nil import-node)))
+    (should (not (null import-node)))
     (should (equal "src/lib" (js2-import-node-module-id import-node)))
     (let ((import (js2-import-node-import import-node)))
-      (should (not (equal nil import)))
-      (should (equal nil (js2-import-clause-node-default-binding import)))
-      (should (equal nil (js2-import-clause-node-named-imports import)))
+      (should (not (null import)))
+      (should (null (js2-import-clause-node-default-binding import)))
+      (should (null (js2-import-clause-node-named-imports import)))
       (let ((ns-import (js2-import-clause-node-namespace-import import)))
-        (should (not (equal nil ns-import)))
+        (should (not (null ns-import)))
         (should (js2-namespace-import-node-p ns-import))
         (should (equal "lib" (js2-name-node-name 
(js2-namespace-import-node-name ns-import)))))))
   (should (js2-scope-get-symbol js2-current-scope "lib")))
@@ -682,14 +682,14 @@ the test."
   (js2-init-scanner)
   (should (js2-match-token js2-IMPORT))
   (let ((import-node (js2-parse-import)))
-    (should (not (equal nil import-node)))
+    (should (not (null import-node)))
     (should (equal "src/lib" (js2-import-node-module-id import-node)))
     (let ((import (js2-import-node-import import-node)))
-      (should (not (equal nil import)))
-      (should (equal nil (js2-import-clause-node-default-binding import)))
-      (should (equal nil (js2-import-clause-node-namespace-import import)))
+      (should (not (null import)))
+      (should (null (js2-import-clause-node-default-binding import)))
+      (should (null (js2-import-clause-node-namespace-import import)))
       (let ((named-imports (js2-import-clause-node-named-imports import)))
-        (should (not (equal nil named-imports)))
+        (should (not (null named-imports)))
         (should (listp named-imports))
         (should (= 2 (length named-imports)))
         (let ((first (nth 0 named-imports))
@@ -704,16 +704,16 @@ the test."
   (js2-init-scanner)
   (should (js2-match-token js2-IMPORT))
   (let ((import-node (js2-parse-import)))
-    (should (not (equal nil import-node)))
+    (should (not (null import-node)))
     (should (equal "src/lib" (js2-import-node-module-id import-node)))
     (let ((import (js2-import-node-import import-node)))
-      (should (not (equal nil import)))
-      (should (equal nil (js2-import-clause-node-named-imports import)))
+      (should (not (null import)))
+      (should (null (js2-import-clause-node-named-imports import)))
       (let ((default (js2-import-clause-node-default-binding import))
             (ns-import (js2-import-clause-node-namespace-import import)))
-        (should (not (equal nil default)))
+        (should (not (null default)))
         (should (equal "stuff" (js2-name-node-name 
(js2-export-binding-node-local-name default))))
-        (should (not (equal nil ns-import)))
+        (should (not (null ns-import)))
         (should (js2-namespace-import-node-p ns-import))
         (should (equal "lib" (js2-name-node-name 
(js2-namespace-import-node-name ns-import)))))))
   (should (js2-scope-get-symbol js2-current-scope "stuff"))
@@ -725,16 +725,16 @@ the test."
   (js2-init-scanner)
   (should (js2-match-token js2-IMPORT))
   (let ((import-node (js2-parse-import)))
-    (should (not (equal nil import-node)))
+    (should (not (null import-node)))
     (should (equal "src/lib" (js2-import-node-module-id import-node)))
     (let ((import (js2-import-node-import import-node)))
-      (should (not (equal nil import)))
-      (should (not (equal nil (js2-import-clause-node-named-imports import))))
+      (should (not (null import)))
+      (should (not (null (js2-import-clause-node-named-imports import))))
       (let ((default (js2-import-clause-node-default-binding import))
             (named-imports (js2-import-clause-node-named-imports import)))
-        (should (not (equal nil default)))
+        (should (not (null default)))
         (should (equal "bob" (js2-name-node-name 
(js2-export-binding-node-local-name default))))
-        (should (not (equal nil named-imports)))
+        (should (not (null named-imports)))
         (should (= 2 (length named-imports))))))
   (should (js2-scope-get-symbol js2-current-scope "bob"))
   (should (js2-scope-get-symbol js2-current-scope "cookies"))
@@ -846,20 +846,20 @@ the test."
 
 (js2-deftest export-function-no-semicolon "export default function foo() {}"
   (js2-mode--and-parse)
-  (should (equal nil js2-parsed-warnings)))
+  (should (null js2-parsed-warnings)))
 (js2-deftest export-default-function-no-semicolon "export function foo() {}"
   (js2-mode--and-parse)
-  (should (equal nil js2-parsed-warnings)))
+  (should (null js2-parsed-warnings)))
 (js2-deftest export-anything-else-does-require-a-semicolon "export var obj = 
{}"
   (js2-mode--and-parse)
-  (should (not (equal nil js2-parsed-warnings))))
+  (should (not (null js2-parsed-warnings))))
 
 (js2-deftest export-default-async-function-no-semicolon "export default async 
function foo() {}"
   (js2-mode--and-parse)
-  (should (equal nil js2-parsed-warnings)))
+  (should (null js2-parsed-warnings)))
 (js2-deftest export-async-function-no-semicolon "export async function foo() 
{}"
   (js2-mode--and-parse)
-  (should (equal nil js2-parsed-warnings)))
+  (should (null js2-parsed-warnings)))
 
 (js2-deftest-parse parse-export-rexport "export * from 'other/lib';")
 (js2-deftest-parse parse-export-export-named-list "export {foo, bar as bang};")



reply via email to

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