[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests 47d9c79 295/316: Moved tests abo
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests 47d9c79 295/316: Moved tests about |
Date: |
Fri, 27 Jan 2017 20:03:48 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit 47d9c79042cc06110f630cef1d2c9a8d1a7d6d35
Author: Eric Ludlam <address@hidden>
Commit: Edward John Steere <address@hidden>
Moved tests about
* test/manual/cedet/cedet/semantic/ia-utest.el: (cedet-uutil): New
require. (semantic-ia-utest): Fix where the test sources are loaded
from. (semantic-symref-test-count-hits-in-tag): Copied from other
related src file.
---
test/manual/cedet/cedet/semantic/ia-utest.el | 32 ++++++++++++++++++++++----
1 file changed, 28 insertions(+), 4 deletions(-)
diff --git a/test/manual/cedet/cedet/semantic/ia-utest.el
b/test/manual/cedet/cedet/semantic/ia-utest.el
index b11cf5f..7fdbeab 100644
--- a/test/manual/cedet/cedet/semantic/ia-utest.el
+++ b/test/manual/cedet/cedet/semantic/ia-utest.el
@@ -1,6 +1,6 @@
;;; semantic/ia-utest.el --- Analyzer unit tests
-;; Copyright (C) 2008, 2009, 2010 Eric M. Ludlam
+;; Copyright (C) 2008, 2009, 2010, 2011 Eric M. Ludlam
;; Author: Eric M. Ludlam <address@hidden>
@@ -29,7 +29,7 @@
;; where # is 1, 2, 3, etc, and some sort of answer list.
;;; Code:
-(require 'cedet-utests)
+(require 'cedet-uutil)
(require 'semantic)
(require 'semantic/analyze)
(require 'semantic/analyze/refs)
@@ -73,7 +73,8 @@ Argument ARG specifies which set of tests to run.
(cedet-utest-log-setup "ANALYZER")
(set-buffer (semantic-find-file-noselect
- (locate-library "semantic/ia-utest.el")))
+ (expand-file-name "cedet/semantic/ia-utest.el"
+ cedet-utest-root)))
(while fl
@@ -527,6 +528,29 @@ If the error occurs w/ a C or C++ file, rethrow the error."
))
+;;;###autoload
+(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
+tag that contains point, and return that."
+ (interactive)
+ (let* ((ctxt (semantic-analyze-current-context))
+ (target (car (reverse (oref ctxt prefix))))
+ (tag (semantic-current-tag))
+ (start (current-time))
+ (Lcount 0))
+ (when (semantic-tag-p target)
+ (semantic-symref-hits-in-region
+ target (lambda (start end prefix) (setq Lcount (1+ Lcount)))
+ (semantic-tag-start tag)
+ (semantic-tag-end tag))
+ (when (cedet-called-interactively-p)
+ (message "Found %d occurances of %s in %.2f seconds"
+ Lcount (semantic-tag-name target)
+ (semantic-elapsed-time start (current-time))))
+ Lcount)))
+
+
(defun semantic-ia-utest-start-log ()
"Start up a testlog for a run."
;; Redo w/ CEDET utest framework.
@@ -538,5 +562,5 @@ Pass ARGS to format to create the log message."
;; Forward to CEDET utest framework.
(apply 'cedet-utest-log args))
-(provide 'semantic/ia-utest)
+(provide 'cedet/semantic/ia-utest)
;;; semantic/ia-utest.el ends here
- [Emacs-diffs] scratch/merge-cedet-tests 02f847a 288/316: New tests., (continued)
- [Emacs-diffs] scratch/merge-cedet-tests 02f847a 288/316: New tests., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests e78d9b8 201/316: Fix merge error in unit tests., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests e7118b0 221/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 4bf5287 199/316: Fix interactive unit tests., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests c40401d 273/316: Remove obsolete cvs-auto-updated 'X-RCS' line., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 8cb6670 304/316: Fake ver_linux for project detection purposes., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests d3a0e00 219/316: Erorr when appropriate, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests c86be27 133/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 02c7dbb 310/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests cebc72c 228/316: Make unit tests use randomized file names, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 47d9c79 295/316: Moved tests about,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests f8e3bbc 311/316: Return fully qualified types if necessary., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 19646a7 141/316: semantic/bovine/c: Add support for typedef references, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 39f1464 235/316: (cit-srecode-fill-cpp): Fixed misspelling of target name., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests fb048d1 006/316: (semantic-c): Hack for Emacs 21 to get things running., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests c43f15e 015/316: Test project configuration file., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 23862f3 023/316: Test friends, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests cdcc2c4 037/316: (Lisp_LISP): Add cit-dist.el, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests bf84fd5 054/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests dbed2db 058/316: Run the tests., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests cfdd9a5 070/316: Tests for polymorphism, Edward John Steere, 2017/01/27