]> code.delx.au - gnu-emacs/blobdiff - test/cedet/semantic-tests.el
Update copyright year to 2016
[gnu-emacs] / test / cedet / semantic-tests.el
index b21b451691b9dedb88f78a622212063bca0508e9..179851fafeb5234fcc4b1e7ddab6c57907589274 100644 (file)
@@ -1,6 +1,6 @@
 ;;; semantic-utest.el --- Miscellaneous Semantic tests.
 
-;;; Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;;; Copyright (C) 2003-2004, 2007-2016 Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 
@@ -54,11 +54,11 @@ All systems are different.  Ask questions along the way."
              (y-or-n-p "New database created.  Reload system databases? ")
            (y-or-n-p "Load in all system databases? "))
       (semanticdb-load-ebrowse-caches)))
-  ;; Ok, databases were creatd.  Lets try some searching.
+  ;; Ok, databases were created.  Let's try some searching.
   (when (not (or (eq major-mode 'c-mode)
                 (eq major-mode 'c++-mode)))
     (error "Please make your default buffer be a C or C++ file, then
-run the test again..")))
+run the test again")))
 
 (defun semanticdb-ebrowse-dump ()
   "Find the first loaded ebrowse table, and dump out the contents."
@@ -83,7 +83,7 @@ run the test again..")))
 (defun semanticdb-test-gnu-global (searchfor &optional standardfile)
   "Test the GNU Global semanticdb.
 Argument SEARCHFOR is the text to search for.
-If optional arg STANDARDFILE is non nil, use a standard file w/ global enabled."
+If optional arg STANDARDFILE is non-nil, use a standard file w/ global enabled."
   (interactive "sSearch For Tag: \nP")
 
   (require 'data-debug)
@@ -107,53 +107,6 @@ If optional arg STANDARDFILE is non nil, use a standard file w/ global enabled."
       (data-debug-new-buffer "*SemanticDB Gnu Global Result*")
       (data-debug-insert-thing result "?" ""))))
 
-;;; From semantic-find
-
-(require 'semantic/find)
-
-(defun semantic-find-benchmark ()
-  "Run some simple benchmarks to see how we are doing.
-Optional argument ARG is the number of iterations to run."
-  (interactive)
-  (require 'benchmark)
-  (let ((f-name nil)
-       (b-name nil)
-       (f-comp)
-       (b-comp)
-       (f-regex)
-       )
-    (garbage-collect)
-    (setq f-name
-         (benchmark-run-compiled
-             1000 (semantic-find-first-tag-by-name "class3"
-                                                   "test/test.cpp")))
-    (garbage-collect)
-    (setq b-name
-         (benchmark-run-compiled
-             1000 (semantic-brute-find-first-tag-by-name "class3"
-                                                         "test/test.cpp")))
-    (garbage-collect)
-    (setq f-comp
-         (benchmark-run-compiled
-             1000 (semantic-find-tags-for-completion "method"
-                                                     "test/test.cpp")))
-    (garbage-collect)
-    (setq b-comp
-         (benchmark-run-compiled
-             1000 (semantic-brute-find-tag-by-name-regexp "^method"
-                                                          "test/test.cpp")))
-    (garbage-collect)
-    (setq f-regex
-         (benchmark-run-compiled
-             1000 (semantic-find-tags-by-name-regexp "^method"
-                                                     "test/test.cpp")))
-
-    (message "Name [new old] [ %.3f %.3f ] Complete [newc/new old] [ %.3f/%.3f %.3f ]"
-            (car f-name) (car b-name)
-            (car f-comp) (car f-regex)
-            (car b-comp))
-  ))
-
 ;;; From semantic-format
 
 (require 'semantic/format)
@@ -235,7 +188,7 @@ Optional argument ARG specifies not to use color."
 
 (defun semantic-lex-test-full-depth (arg)
   "Test the semantic lexer in the current buffer parsing through lists.
-Usually the lexer parses
+Usually the lexer parses.
 If universal argument ARG, then try the whole buffer."
   (interactive "P")
   (let* ((start (current-time))
@@ -309,7 +262,7 @@ Analyze the area between BEG and END."
 
 (defun semantic-symref-test-count-hits-in-tag ()
   "Lookup in the current tag the symbol under point.
-the count all the other references to the same symbol within the
+Then count all the other references to the same symbol within the
 tag that contains point, and return that."
   (interactive)
   (let* ((ctxt (semantic-analyze-current-context))
@@ -323,7 +276,7 @@ tag that contains point, and return that."
        (semantic-tag-start tag)
        (semantic-tag-end tag))
       (when (interactive-p)
-       (message "Found %d occurances of %s in %.2f seconds"
+       (message "Found %d occurrences of %s in %.2f seconds"
                 Lcount (semantic-tag-name target)
                 (semantic-elapsed-time start (current-time))))
       Lcount)))
@@ -434,5 +387,3 @@ gcc version 2.95.2 19991024 (release)"
   (let ((semantic-gcc-test-strings (list (semantic-gcc-query "gcc" "-v"))))
     (semantic-gcc-test-output-parser))
   )
-
-;; arch-tag: 91686489-4ab3-4392-8277-b3831269ddbb