Eric Ludlam [Thu, 2 Jan 2014 01:46:30 +0000 (20:46 -0500)]
Add test code for use with sources in globalref
* test/manual/cedet/cit-globalref.el: New test code for use with
sources in tests/integ_src/globalref. Makes sure GNU Global will
create tags database, jump to correct impl from a prototype, and
also checks how many buffers are opened along the way to make sure
the expected number are found.
Eric Ludlam [Sat, 11 Apr 2015 23:21:23 +0000 (19:21 -0400)]
Test refactor/move
* test/manual/cedet/cedet/semantic/ia-utest.el:
(semantic-ia-utest-file-list): Add tests/test.texi, test.mk, and
test.srt (semantic-ia-utest-buffer, semantic-ia-utest-buffer-refs)
(semantic-sr-utest-buffer-refs, semantic-src-utest-buffer-refs): When
scanning for comments, wrap comment-start-skip to handle modes that
have an unbound or in them. Skip back over whitespace from in front
of found test point comments.
Eric Ludlam [Mon, 17 Feb 2014 14:16:52 +0000 (09:16 -0500)]
Improve test utilities
* lisp/cedet/semantic/analyze.el:
(semantic-analyze-find-tag-sequence-default): If first entry in
sequence is the only one, apply tagclass
filter. (semantic-analyze-princ-sequence): Show slot even if empty.
* tests/cedet/semantic/ia-utest.el: (semantic-ia-utest-file-list): Add
testvarnames.java.
* tests/cedet/semantic/test/manual/cedet/Project.ede:
("semantic/tests"): Add testvarnames.java
* tests/cedet/semantic/test/manual/cedet/testvarnames.java: New test
file
David Engster [Sun, 28 Jul 2013 11:24:40 +0000 (13:24 +0200)]
Remove compatibility function `cedet-called-interactively-p'.
* lisp/cedet/cedet-compat.el (cedet-called-interactively-p): Remove.
It is no longer needed since our minimum version is now 23.2, which
has `called-interactively-p'. Also, remove corresponding unit
tests.
* tests/cedet-utests.el (cedet-utest-test-alist): Remove cedet-compat
unit tests.
* All files: Replace `cedet-called-interactively-p' with
`called-interactively-p', providing 'any as argument where it was
still missing.
Eric Ludlam [Sat, 20 Aug 2011 17:07:24 +0000 (13:07 -0400)]
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.
David Engster [Mon, 4 Nov 2013 22:15:03 +0000 (23:15 +0100)]
Make unit tests use randomized file names
* tests/cedet/semantic/stltest.el:
* tests/cedet/semantic/utest-parse.el:
* tests/cedet/srecode/fields-utest.el:
* tests/cedet/srecode/test-getset.el:
* tests/cedet/srecode/test.el:
* tests/eieio/eieio-test-persist.el: Make all those tests use
`make-temp-name' for their test files, so that tests can run in
parallel.
Eric Ludlam [Fri, 24 Oct 2014 19:33:32 +0000 (15:33 -0400)]
Don't fail the test for errors which don't mean a failure
* test/manual/cedet/cit-externaldb.el: (cit-externaldb-test): Catch
failures that shouldn't fail tests. (cit-externaldb-cleanup): New
(cit-gnu-externaldb-test-one): Catch if the create fails from the
external program, cleanup, and throw. Improve fail messages to help
identify problems.
Darren Hoo [Thu, 6 Oct 2011 17:13:59 +0000 (19:13 +0200)]
Don't set :filename if it's already set
* test/manual/cedet/cit-externaldb.el:
(semanticdb-strip-find-results): Check if there already is a
:filename attribute set, so that file information from GNU Global
will not be lost.
* tests/cit-externaldb.el: New test for :filename property. Make
doc-string and comments generic, since this is not specific to GNU
global.
* test/manual/cedet/cit-externaldb.el: (cit-external-db-tool-list):
Change all create fcns for db tools to use new create fcns added for
each project type. (cit-gnu-externaldb-test-one): Change calling
convention to create a db to conform to new fcns.
zappo [Sun, 13 Jun 2010 13:54:59 +0000 (13:54 +0000)]
Fixes for external db tests
* test/manual/cedet/cit-externaldb.el: (cit-externaldb-files-to-find):
Change files to those common between Make and AutoMake.
(cit-gnu-externaldb-test-one): Require ede-locate Call
`ede-enable-locate-on-project' to start/end the test so that the
locate system is available for the project later.
zappo [Thu, 15 Oct 2009 03:42:55 +0000 (03:42 +0000)]
Remove eieio bits and only use eieio bits for make types
* test/manual/cedet/cit-el.el (cit-el-tags): Removed eieio
bits. (cit-el-tags-eieio): New, from above. (cit-srecode-fill-el):
Only use eieio bits for Make types.
Eric Ludlam [Sun, 12 Apr 2015 01:13:57 +0000 (21:13 -0400)]
Added test functions
* test/manual/cedet/cedet/semantic/utest-c.el: (semantic-utest-c-ede):
New (semantic-utest-c): Add call to
below. (semantic-utest-c-with-ede): New test function
(semantic-utest-c-setup-ede): New.
David Engster [Thu, 1 Dec 2011 19:13:55 +0000 (20:13 +0100)]
Fix unit testing for several tests and do better error checking.
* semantic/lex-spp-utests.el (semantic-lex-spp-write-utest):
* tests/cedet-utests.el (cedet-utest-eieio-classloader): Throw
error if we cannot locate test files.
* semantic/utest-c.el (semantic-utest-c-compare)
(semantic-utest-c-conditionals):
* semantic/lex-spp-utest.el (semantic-lex-spp-write-utest): Adapt
to new directory structure and do better error checking to avoid
silent failures in the future.
zappo [Sun, 27 Dec 2009 03:37:04 +0000 (03:37 +0000)]
Test updating the project version
* test/manual/cedet/cit-dist.el: (cit-make-dist): Test w/ default
version, then update and test again. (cit-update-version): Force
rebuild of Makefile.
Eric Ludlam [Sun, 31 Mar 2013 19:27:44 +0000 (15:27 -0400)]
Added cpproot tests
* test/manual/cedet/cit-cpproot.el: (cit-integ-cpproot-sys-subdir):
New. (cit-integ-cpproot-sys-srcdir):
New. (cit-src-cpproot-main-tags): Added 3 new
tags. (cit-cpproot-depfiles): New. (cit-ede-cpproot-test): Make copy
work in emacs 23&24. Add new include dirs Add more spp files. Check
all includes that they are found in the expected directories.
Eric Ludlam [Thu, 13 Sep 2012 01:38:12 +0000 (21:38 -0400)]
etc/srecode/c.srt: New file, contents from cpp.srt
etc/srecode/cpp.srt: Delete parts moved to c.srt
lisp/cedet/ede.el:
(ede-configuration-forms-menu): Make robust to cases where there is no
current project.
lisp/cedet/srecode/cpp.el:
(srecode-semantic-handle-:c): Renamed from the srecode-semantic-handle-:cpp.
(srecode-semantic-handle-:cpp): Calls above.
(c-mode::srecode-semantic-apply-tag-to-dict): Moved from a cpp-mode
function to a c-mode function. Note this in doc.
(srecode-c-apply-templates): Renamed from srecode-cpp-apply-templates
tests/cit-cpp.el:
(cit-plain-c-tags): New variable
(cit-srecode-fill-cpp): Insert above into a new file as part of a new program.
* test/manual/cedet/cit-cpp.el: (cit-header-cpp-tags): Add some code
to foo constructor. (cit-src-cpp-tags): Add stdio.h include. Add code
to the methods to call through the class and eventually print
MOOSE. (cit-main-cpp-tags): Remove stdio.h include. Replace print
code with call to the foo class to print
MOOSE. (cit-symref-operations): New variable.
(cit-remove-add-to-project-cpp): Delete .o files also.
(cit-remove-and-do-shared-lib): Specify the compiler to use.
zappo [Tue, 16 Mar 2010 03:05:27 +0000 (03:05 +0000)]
Improve compilation active detection
* test/manual/cedet/cit-cpp.el: (cit-remove-add-to-project-cpp)
(cit-remove-and-do-shared-lib): Use cit-wait-for-compilation and
cit-check-compilation-for-error.
zappo [Sat, 8 Aug 2009 21:51:27 +0000 (21:51 +0000)]
New make-type argument to control which include
variable is used
* test/manual/cedet/cit-cpp.el: (cit-srecode-fill-cpp): Accept
make-type argument. Control how projects are made based on what
include variable is used based on above.
Eric Ludlam [Mon, 30 Dec 2013 21:33:24 +0000 (16:33 -0500)]
Added more test data
* test/manual/cedet/cedet/semantic/tests/testvarnames.c:
(varorstruct): New struct and variable. (assigntovarorstruct): New
variable that doesn't start with 'var'. (test_1): Add test when
assigning into varorstruct that we get a match.
David Engster [Mon, 4 Nov 2013 22:15:03 +0000 (23:15 +0100)]
Make unit tests use randomized file names
* tests/cedet/semantic/stltest.el:
* tests/cedet/semantic/utest-parse.el:
* tests/cedet/srecode/fields-utest.el:
* tests/cedet/srecode/test-getset.el:
* tests/cedet/srecode/test.el:
* tests/eieio/eieio-test-persist.el: Make all those tests use
`make-temp-name' for their test files, so that tests can run in
parallel.
Eric Ludlam [Sat, 20 Aug 2011 17:11:28 +0000 (13:11 -0400)]
Force srecode repo location and add decorations to debug output
* test/manual/cedet/cedet/srecode/test.el: (cl, cedet-uutil): New
require (cedet-utests): Deleted require. (srecode-map-load-path):
Force the srecode repository location in. (srecode-utest-map-reset):
New test fcn. (srecode-utest-test): Add decorations to debug
output. (cedet/srecode/test): Fix require.
David Engster [Mon, 4 Nov 2013 22:15:03 +0000 (23:15 +0100)]
Make unit tests use randomized file names
* tests/cedet/semantic/stltest.el:
* tests/cedet/semantic/utest-parse.el:
* tests/cedet/srecode/fields-utest.el:
* tests/cedet/srecode/test-getset.el:
* tests/cedet/srecode/test.el:
* tests/eieio/eieio-test-persist.el: Make all those tests use
`make-temp-name' for their test files, so that tests can run in
parallel.
David Engster [Mon, 18 Nov 2013 22:11:17 +0000 (23:11 +0100)]
C++: Deal with 'using' statements when calculating scope
* semantic/bovine/c.el (semantic-ctxt-scoped-types): Go through all
tags around point and search them for using statements. Before, we
skipped the last one thinking that it would have to be function, but
it could also be a type.
* semantic/scope.el (semantic-completable-tags-from-type): When
creating the list of completable types, pull in types which are
referenced through 'using' statements.
* tests/cedet/semantic/test/manual/cedet/testusing.cpp:
* tests/cedet/semantic/test/manual/cedet/testusing.hh: Add tests for
the above.
David Engster [Mon, 18 Nov 2013 22:11:17 +0000 (23:11 +0100)]
C++: Deal with 'using' statements when calculating scope
* semantic/bovine/c.el (semantic-ctxt-scoped-types): Go through all
tags around point and search them for using statements. Before, we
skipped the last one thinking that it would have to be function, but
it could also be a type.
* semantic/scope.el (semantic-completable-tags-from-type): When
creating the list of completable types, pull in types which are
referenced through 'using' statements.
* tests/cedet/semantic/test/manual/cedet/testusing.cpp:
* tests/cedet/semantic/test/manual/cedet/testusing.hh: Add tests for
the above.
David Engster [Wed, 18 Sep 2013 19:44:03 +0000 (21:44 +0200)]
C/C++: Parse 'using' statements in the correct order.
(c++-mode:semantic-ctxt-scoped-types): In the case for using
statements outside of function scope, append them in the correct order
instead of using 'cons'. This is important since using statements may
depend on previous ones.
* tests/cedet/semantic/test/manual/cedet/testusing.cpp: Add test for
the above.
David Engster [Sun, 15 Sep 2013 09:19:30 +0000 (11:19 +0200)]
Another 'using namespace' fix
(semantic-analyze-scoped-types-default): If we cannot find a type in
the typecache, also look into the the types we already found. This is
necessary since in C++, a 'using namespace' can be dependend on a
previous one.
David Engster [Thu, 25 Oct 2012 18:38:27 +0000 (20:38 +0200)]
Simplify alias referencing and add tests.
* lisp/cedet/semantic/analyze.el (semantic-analyze-dereference-alias):
Only dereference first tag, since at least for C++ this is enough.
(semantic-analyze-current-context-default): Adapt comment.
* tests/cedet/semantic/test/manual/cedet/testusing.cpp: Add tests for
the above.