[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests da4dd24 253/316: New test for te
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests da4dd24 253/316: New test for testing ede/cpp-root projects. |
Date: |
Sat, 28 Jan 2017 09:10:08 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit da4dd241ab21f74a57f24e6315e63c45807244e6
Author: Eric Ludlam <address@hidden>
Commit: Edward John Steere <address@hidden>
New test for testing ede/cpp-root projects.
---
test/manual/cedet/cit-cpproot.el | 102 ++++++++++++++++++++++++++++++++++++++
1 file changed, 102 insertions(+)
diff --git a/test/manual/cedet/cit-cpproot.el b/test/manual/cedet/cit-cpproot.el
new file mode 100644
index 0000000..074dfbd
--- /dev/null
+++ b/test/manual/cedet/cit-cpproot.el
@@ -0,0 +1,102 @@
+;;; cit-cpproot.el --- Test ede/cpp-root project features
+;;
+;; Copyright (C) 2012 Eric M. Ludlam
+;;
+;; Author: Eric M. Ludlam <address@hidden>
+;;
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+;;
+;; The ede/cpp-root project type has features designed to overlay on top
+;; of any project that is built out of a significant portion of C++
+;; code.
+;;
+;; In particular, ede/cpp-root projects support preprocessor symbols,
+;; and files of preprocessor symbols whos features need to be tested.
+
+;;; Code:
+(require 'cedet-android)
+(require 'ede/android)
+
+;;; Setup
+(defvar cit-integ-target-cpproot
+ (expand-file-name "edeproj_ede_cpproot" cedet-integ-base)
+ "Root of the EDE project integration tests for the ede/cpp-root project.")
+
+(defvar cit-integ-cpproot-subdir "integ_src/cpproot/"
+ "Directory of files to copy into the tmp project dir.")
+
+(defvar cit-integ-cpproot-srcdir
+ (expand-file-name
+ cit-integ-cpproot-subdir
+ (file-name-directory (locate-library "cit-cpproot")))
+ "The source directory dor the CPP root sources.")
+
+(defvar cit-src-cpproot-main-tags
+ (list
+ (semantic-tag-new-include "sppmacros.h" nil)
+ (semantic-tag-new-include "test.h" nil)
+ (semantic-tag-new-function
+ "main" "int"
+ (list (semantic-tag-new-variable "argc" "int")
+ (semantic-tag-new-variable "argv" "char"
+ nil
+ :pointer 1
+ :dereference 1)))
+ (semantic-tag-new-function "feature1" "int" nil)
+ (semantic-tag-new-function "feature2" "int" nil)
+ (semantic-tag-new-function "feature3" "int" nil)
+ (semantic-tag-new-function "generic_feature" "int" nil)
+ )
+ "List of tags we need to be able to to find in main.cpp")
+
+
+(defun cit-ede-cpproot-test ()
+ "Test EDE cpproot based Project."
+
+ ;; Create directory for the project
+ (cit-make-dir cit-integ-target-cpproot)
+
+ ;; Copy source files into the cpproot directory
+ (copy-directory cit-integ-cpproot-srcdir cit-integ-target-cpproot t t)
+
+ ;; Create the ede-cpp-root-project class directly.
+ (ede-cpp-root-project
+ "TESTCPPROOT"
+ :file (expand-file-name "main.cpp" cit-integ-target-cpproot)
+ :spp-table '( ("FEATURE3" . "1")
+ ("RANDOM" . "random") )
+ :spp-files '( "sppmacros.h" ))
+
+ ;; Load up main
+ (find-file (cit-file-cpproot "main.cpp"))
+
+ ;; Validate found tags based on project provided macros.
+ (cit-srecode-verify-tags (semantic-fetch-tags)
+ cit-src-cpproot-main-tags)
+
+ )
+
+
+(defun cit-file-cpproot (filename)
+ "Return a testing filename.
+Append FILENAME to the target directory."
+ (expand-file-name filename cit-integ-target-cpproot))
+
+(provide 'cit-cpproot)
+
+;;; cit-android.el ends here
- [Emacs-diffs] scratch/merge-cedet-tests 644d6ca 278/316: Test external database tools., (continued)
- [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, 2017/01/28
- [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 <=
- [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
- [Emacs-diffs] scratch/merge-cedet-tests 2f8e8c8 272/316: Remove eieio bits and only use eieio bits for make types, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 4ab930b 225/316: C++: Deal with 'using' statements when calculating scope, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 800b575 081/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests a9cd804 265/316: New tests., Edward John Steere, 2017/01/28