Eric Ludlam [Mon, 24 Nov 2014 17:38:04 +0000 (12:38 -0500)]
Test typedef which has the keyword "class" included
* test/manual/cedet/cedet/semantic/tests/testtypedefs.cpp:
(NS2::Myclass, MyClassHandle, dixon): New test w/ a typedef that has
keyword "class" included, instead of omitted as with other tests.
David Engster [Fri, 20 Sep 2013 19:54:31 +0000 (21:54 +0200)]
Fix parsing of default values and display them in default formatter
* semantic/bovine/c.by (variablearg, varnamelist): Add default values
so that it can be later expanded into the tag.
(opt-stuff-after-symbol): Rename to 'brackets-after-symbol' and
remove empty match.
(multi-stage-dereference): Adapt to above rename.
(unaryexpression): Use 'symbol' instead of 'namespace-symbol', since
the latter also leads to an empty match at the end which would make
this too greedy.
* semantic/format.el (semantic-format-tag-prototype-default):
Display default values if available.
Parsing of default values for variables and function arguments was
broken with the refactoring done in rev. 7622. While fixing this, it
turned out that our parser for expressions like
char *foo = NULL;
was too greedy and also covered the semicolon because of empty matches
in rules 'opt-stuff-after-symbol' and 'opt-template-specifier',
leading to a variable with a default-value of "NULL;". This was fixed
by removing the empty match in 'opt-stuff-after-symbol' and using
'symbol' instead of 'namespace-symbol'.
Eric Ludlam [Sun, 24 Aug 2014 14:02:42 +0000 (10:02 -0400)]
detect-utest.el: (ede-detect-utest-configdir): New fcn (ede-detect-utest-arduino-install): New faux install dir (ede-detect-utest-init-dirmatch): Point at fake intalldir to get fake board.
Eric Ludlam [Sun, 22 Jun 2014 00:36:58 +0000 (20:36 -0400)]
Fixes for test execution
* test/manual/cedet/cedet/ede/detect-utest.el: (ede-detect-entry):
Remove `found-state' slot as it was unused. (ede-detect-show-state):
When an error in init, show it. (ede-detect-utest-project-entries):
Add a linux driver test added where this dir would detect as generic
makefile, but it is in Linux. (ede-detect-utest-loop): Add better
failed load message.
Eric Ludlam [Wed, 4 Jun 2014 01:59:30 +0000 (21:59 -0400)]
Major test restructure
* test/manual/cedet/cedet/ede/detect-utest.el:
(ede-ditect-utest-project-list): Deleted. Replaced
with... (ede-detect-utest-project-entries): New list of entries to
test. (ede-detect-utest-project-dirmatch-list): Deleted. Replaced
with ... (ede-detect-utest-project-dirmatch-entries): New list of
entries to test dirmatch with. (ede-detect-entry): New class for
storing test points. (ede-detect-entry::ede-detect-do-test)
(ede-detect-show-state, ede-detect-entry::ede-detect-state)
(ede-detect-entry::ede-detect-show-progress): New. ("UTESTCPP",
"UTESTJAVA"): Add :name to these projects. (ede-detect-utest):
Replace feature unloaded/loaded with calls to
`ede-detect-utest-validate-loadstate'. Change variables passed to
utest-loop. (ede-detect-utest-loop): Replace old refs into cons cells
with refs into the class. Replace all bit warnings by pushing text
into the test entry objects. Add double-initialze test. Add call to
project rescan. At end, dump out the state captured during testing.
(ede-detect-utest-rescan):
New. (ede-detect-utest-validate-loadstate): New, content copied from
`ede-detect-utest'. (dirmatchtest autoload): Add root-only as nil.
Eric Ludlam [Sun, 1 Jun 2014 02:02:48 +0000 (22:02 -0400)]
(ede-detect-utest-project-list): Add test for generic VC type project. (ede-detect-utest): Add fake autoloader for VC. (ede-detect-utest-generic-vc-p): New.
Eric Ludlam [Sat, 24 May 2014 01:58:31 +0000 (21:58 -0400)]
Added arduino project detection
* test/manual/cedet/cedet/ede/detect-utest.el:
(ede-detect-utest-project-dirmatch-list): Add arduino. Add subdir
tests for dirmatch and arudino. (ede-detect-utest): Also test for
arduino lib not loading/loading. (ede-detect-utest-arduino-fname):
New. (ede-detect-utest-init-dirmatch): Reconfigure for reading
arduino data out of temp created config files.
Eric Ludlam [Fri, 23 May 2014 10:24:02 +0000 (06:24 -0400)]
Additions to detection testing
* test/manual/cedet/cedet/ede/detect-utest.el:
(ede-detect-utest-project-list): Doc fix
(ede-detect-utest-project-dirmatch-list): New (ede-detect-utest):
Split out body. Pull up start/end logging. Add testing for dirmatch
not loaded/loaded. Add testing for the dirmatch project.
(ede-detect-utest-loop): Previous content of above.
Eric Ludlam [Sun, 18 May 2014 22:58:05 +0000 (18:58 -0400)]
Added cpproot and java root to detection tests
* test/manual/cedet/cedet/ede/detect-utest.el:
(ede-detect-utest-project-list): Add cpproot and javaroot. Add sub
dirs under project and automake types. (ede-detect-utest-basedir):
New function (UTESTCPP, UTESTJAVA): New. (ede-detect-utest): Improve
debug output for failed tests. (ede-detect-utest-subproj-p,
ede-detect-utest-subautomake-p): New.
Eric Ludlam [Thu, 2 Jan 2014 01:44:55 +0000 (20:44 -0500)]
Test files contributed by Barry OReilly
* test/manual/cedet/integ_src/globalref/inc/Util.hh: These test files
contributed by Barry OReilly, modified for use in the automated tests
for CEDET, and with additional comments. inc/Util.hh, src/Util.cc:
Search symbol both in and outside of namespaces.
Eric Ludlam [Thu, 2 Jan 2014 01:44:55 +0000 (20:44 -0500)]
Tests contributed by Barry OReilly
* test/manual/cedet/integ_src/globalref/src/Util.cc: These test files
contributed by Barry OReilly, modified for use in the automated tests
for CEDET, and with additional comments. inc/Util.hh, src/Util.cc:
Search symbol both in and outside of namespaces.
David Engster [Sun, 27 Oct 2013 21:13:46 +0000 (22:13 +0100)]
Expand preprocessor to handle macros which open or close scope.
* semantic/lex-spp.el (semantic-c-end-of-macro): Declare.
(semantic-lex-spp-token-macro-to-macro-stream): Deal with macros which
open/close a scope. For this, leave an overlay if we encounter a
single open paren and return a semantic-list in the lexer. When this
list gets expanded, retrieve the old position from the overlay. See
the comments in the function for further details.
(semantic-lex-spp-find-closing-macro): New function to find the next
macro which closes scope (i.e., has a closing paren).
(semantic-lex-spp-replace-or-symbol-or-keyword): Go to end of closing
macro if necessary.
(semantic-lex-spp-paren-or-list): New lexer to specially deal with
parens in macro definitions.
* bovine/c.el (semantic-cpp-lexer): Use new
`semantic-lex-spp-paren-or-list'.
* tests/cedet/semantic/test/manual/cedet/testsppreplace.c:
* tests/cedet/semantic/test/manual/cedet/testsppreplaced.c: Add tests for the
above.
David Engster [Sat, 19 Oct 2013 11:35:06 +0000 (13:35 +0200)]
C/C++: Fix function pointer parsing
* semantic/bovine/c.by (variablearg-opt-name): Support parsing of
function pointers inside an argument list.
* semantic/bovine/c.el (semantic-c-reconstitute-token): Change
handling of function pointers; instead of seeing them as variables,
handle them as functions with a 'function-pointer' attribute. Also,
correctly deal with function pointers as function arguments.
(semantic-c-reconstitute-function-arglist): New function to parse
function pointers inside an argument list.
(semantic-format-tag-name): Use 'function-pointer' attribute instead
of the old 'functionpointer-flag'.
* tests/cedet/semantic/test/manual/cedet/testsppreplace.c:
* tests/cedet/semantic/test/manual/cedet/testsppreplaced.c: Disable
test which now breaks due to improved function pointer parsing.
This test is broken anyway, since it just succeeded because the
argument list was not parsed at all before this commit. The
underlying bug was always present in the semantic preprocessor.
David Engster [Mon, 4 Nov 2013 22:24:55 +0000 (23:24 +0100)]
Improve test utilities re complation and deletion
* tests/cedet-integ-test.el (cit-check-compilation-for-error): Use
correct format-string.
* cedet/semantic/stltest.el: Only delete test file if it exists (which
it shouldn't do, but still...).
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 [Sun, 27 Oct 2013 21:13:46 +0000 (22:13 +0100)]
Expand preprocessor to handle macros which open or close scope.
* semantic/lex-spp.el (semantic-c-end-of-macro): Declare.
(semantic-lex-spp-token-macro-to-macro-stream): Deal with macros which
open/close a scope. For this, leave an overlay if we encounter a
single open paren and return a semantic-list in the lexer. When this
list gets expanded, retrieve the old position from the overlay. See
the comments in the function for further details.
(semantic-lex-spp-find-closing-macro): New function to find the next
macro which closes scope (i.e., has a closing paren).
(semantic-lex-spp-replace-or-symbol-or-keyword): Go to end of closing
macro if necessary.
(semantic-lex-spp-paren-or-list): New lexer to specially deal with
parens in macro definitions.
* bovine/c.el (semantic-cpp-lexer): Use new
`semantic-lex-spp-paren-or-list'.
* tests/cedet/semantic/test/manual/cedet/testsppreplace.c:
* tests/cedet/semantic/test/manual/cedet/testsppreplaced.c: Add tests for the
above.
David Engster [Sat, 19 Oct 2013 11:35:06 +0000 (13:35 +0200)]
C/C++: Fix function pointer parsing
* semantic/bovine/c.by (variablearg-opt-name): Support parsing of
function pointers inside an argument list.
* semantic/bovine/c.el (semantic-c-reconstitute-token): Change
handling of function pointers; instead of seeing them as variables,
handle them as functions with a 'function-pointer' attribute. Also,
correctly deal with function pointers as function arguments.
(semantic-c-reconstitute-function-arglist): New function to parse
function pointers inside an argument list.
(semantic-format-tag-name): Use 'function-pointer' attribute instead
of the old 'functionpointer-flag'.
* tests/cedet/semantic/test/manual/cedet/testsppreplace.c:
* tests/cedet/semantic/test/manual/cedet/testsppreplaced.c: Disable
test which now breaks due to improved function pointer parsing.
This test is broken anyway, since it just succeeded because the
argument list was not parsed at all before this commit. The
underlying bug was always present in the semantic preprocessor. ---
tests/cedet/semantic/test/manual/cedet/testsppreplace.c | 8 ++++++++
1 file changed, 8 insertions(+)
Eric Ludlam [Thu, 23 Oct 2014 02:05:36 +0000 (22:05 -0400)]
Added arduino and better suggestions
* test/manual/cedet/cedet/ede/secure-utest.el:
(ede-security-project-entries): Add arduino.
(ede-security-test-one-entry): Improve an error w/ suggestion on a
thing to fix.
Eric Ludlam [Wed, 22 Oct 2014 02:30:50 +0000 (22:30 -0400)]
Fixes for security tests
* test/manual/cedet/cedet/ede/secure-utest.el: (ede-security-entry):
Remove init-state, with[out]-permission
slots. (ede-security-project-entries): Add generic config based
projects. (ede-security-test-one-entry): Add long test for
configuration loading, and the security steps involved in making the
config load.
Eric Ludlam [Sun, 19 Oct 2014 03:08:00 +0000 (23:08 -0400)]
EDE security tests
Tests for the security system in EDE that marks some project types as
unsafe. This makes sure that the user isn't pestered too much, and
that if they say yes or no the right thing happens.
* Makefile (top-level): Remove eieio compilation and add compilation of
fallback eieio for Emacs 24.1 and 24.2. Throw error for Emacs 23.x.
* cedet-devel-load.el: Always require eieio at the top. Load
cedet-compat earlier. Remove advices for eieio helpers.
* cedet-remove-builtin.el: eieio must not be removed anymore.
* semantic/ede-grammar.el (semantic-ede-proj-target-grammar): Remove
cedet-compat from aux-packages initform, as it will be loaded by
cedet-devel-load anyway.
(ede-proj-makefile-insert-variables): Remove eieio from load-path.
* lisp/cedet/cedet-compat.el: Load fallback eieio for Emacs 24.1 and
24.2. Add new aliases for Emacs 24.3.
* Project.ede, Makefiles: Remove eieio and regenerate.
David Engster [Thu, 13 Sep 2012 19:17:45 +0000 (21:17 +0200)]
Move Speedbar development to Emacs trunk.
Moved Speedbar, dframe, sb-image and documentation to obsolete.
Development of Speedbar now happens solely in Emacs trunk. This also
means that all other CEDET packages now depend on Speedbar from Emacs
proper.
Eric Ludlam [Thu, 2 Jan 2014 01:44:55 +0000 (20:44 -0500)]
Test files contributed by Barry OReilly
* test/manual/cedet/integ_src/globalref/test/ManagerTest.hh: These
test files contributed by Barry OReilly, modified for use in the
automated tests for CEDET, and with additional comments.
inc/Util.hh, src/Util.cc: Search symbol both in and outside of
namespaces.
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 [Thu, 2 Jan 2014 01:44:55 +0000 (20:44 -0500)]
Test files contributed by Barry OReilly
* test/manual/cedet/integ_src/globalref/test/ManagerTest.cc: These
test files contributed by Barry OReilly, modified for use in the
automated tests for CEDET, and with additional comments.
inc/Util.hh, src/Util.cc: Search symbol both in and outside of
namespaces.
David Engster [Mon, 4 Nov 2013 21:31:41 +0000 (22:31 +0100)]
Use random temporary directory for integration tests
* tests/cedet-integ-test.el (cedet-integ-base): Use `make-temp-name'
so that integrations tests can run in parallel.
(cedet-integ-test-proj): Delete it after usage.
(cit-check-compilation-for-error): Show compilation output in
batch-mode.
* tests/cit-test.sh: Do not remove temporary directory.