[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: |
Sat, 28 Jan 2017 09:10:12 +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 0caf48a 302/316: Improve test output, (continued)
- [Emacs-diffs] scratch/merge-cedet-tests 0caf48a 302/316: Improve test output, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 975468f 275/316: Add header comments and provide., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 60a3f4b 299/316: (semantic-ia-utest-file-list): add testwisent.wy, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests e492fd9 301/316: (semantic-ia-utest-file-list): Add testunion.cpp., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 644d6ca 278/316: Test external database tools., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 9cac087 281/316: Remove obsolete cvs-auto-updated 'X-RCS' line., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 7eeab10 240/316: (cit-remove-and-do-shared-lib): Enable for use with Make projects too. Create the srcs in a new lib directory., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests a4e395c 156/316: Add a final call to ede list sanity check, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 6d5a631 277/316: Add header comments and provide., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests bef87bf 290/316: Make unit tests use randomized file names, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 47d9c79 295/316: Moved tests about,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests 02c7dbb 310/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 0a0dd27 167/316: Test typedef which has the keyword "class" included, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests dfddc2d 262/316: (cit-make-dist): Use cit-check-compilation-for-error., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests da4dd24 253/316: New test for testing ede/cpp-root projects., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 8d32d3a 160/316: Fix parsing of default values and display them in default formatter, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests e96e309 178/316: Added new subdir and ensure that the base dir, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 4972b30 176/316: (ede, ede-make): New require (cit-srecode-verify-tags): Fix debugging output on failure. Patch from David Engster (cit-compile-and-wait): Use ede-make-command, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests e4d6b74 280/316: Use new create functions for db tools, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 8cb6670 304/316: Fake ver_linux for project detection purposes., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests a25699b 222/316: semantic/bovine/c: Parse C++ override/final correctly, Edward John Steere, 2017/01/28