emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4786353 2/2: Move cedet test resource files to follow our convent


From: Stefan Kangas
Subject: master 4786353 2/2: Move cedet test resource files to follow our conventions
Date: Wed, 10 Feb 2021 07:08:20 -0500 (EST)

branch: master
commit 4786353b2abc756d3fd6bda016859b40ba9aca8a
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Move cedet test resource files to follow our conventions
    
    * test/lisp/cedet/semantic-utest-ia.el (ert, ert-x): Require.
    (cedet-utest-directory, semantic-utest-test-directory): Remove
    variables.
    (semantic-utest-ia-doublens.cpp, semantic-utest-ia-subclass.cpp)
    (semantic-utest-ia-typedefs.cpp, semantic-utest-ia-struct.cpp)
    (semantic-utest-ia-templates.cpp, semantic-utest-ia-using.cpp)
    (semantic-utest-ia-nsp.cpp, semantic-utest-ia-localvars.cpp)
    (semantic-utest-ia-namespace.cpp)
    (semantic-utest-ia-sppcomplete.c, semantic-utest-ia-varnames.c)
    (semantic-utest-ia-javacomp.java)
    (semantic-utest-ia-varnames.java, semantic-utest-ia-wisent.wy)
    (semantic-utest-ia-texi, semantic-utest-ia-make)
    (semantic-utest-ia-srecoder): Use 'ert-resource-file'.  Don't
    check if file exists; we can assume that it does.
    
    * test/manual/cedet/tests/testjavacomp.java:
    * test/manual/cedet/tests/testlocalvars.cpp:
    * test/manual/cedet/tests/testnsp.cpp:
    * test/manual/cedet/tests/testsppcomplete.c:
    * test/manual/cedet/tests/teststruct.cpp:
    * test/manual/cedet/tests/testsubclass.cpp:
    * test/manual/cedet/tests/testsubclass.hh:
    * test/manual/cedet/tests/testtemplates.cpp:
    * test/manual/cedet/tests/testtypedefs.cpp:
    * test/manual/cedet/tests/testusing.cpp:
    * test/manual/cedet/tests/testusing.hh:
    * test/manual/cedet/tests/testvarnames.c:
    * test/manual/cedet/tests/testvarnames.java:
    * test/manual/cedet/tests/testwisent.wy: Move from here...
    * test/lisp/cedet/semantic-utest-ia-resources/testjavacomp.java:
    * test/lisp/cedet/semantic-utest-ia-resources/testlocalvars.cpp:
    * test/lisp/cedet/semantic-utest-ia-resources/testnsp.cpp:
    * test/lisp/cedet/semantic-utest-ia-resources/testsppcomplete.c:
    * test/lisp/cedet/semantic-utest-ia-resources/teststruct.cpp:
    * test/lisp/cedet/semantic-utest-ia-resources/testsubclass.cpp:
    * test/lisp/cedet/semantic-utest-ia-resources/testsubclass.hh:
    * test/lisp/cedet/semantic-utest-ia-resources/testtemplates.cpp:
    * test/lisp/cedet/semantic-utest-ia-resources/testtypedefs.cpp:
    * test/lisp/cedet/semantic-utest-ia-resources/testusing.cpp:
    * test/lisp/cedet/semantic-utest-ia-resources/testusing.hh:
    * test/lisp/cedet/semantic-utest-ia-resources/testvarnames.c:
    * test/lisp/cedet/semantic-utest-ia-resources/testvarnames.java:
    * test/lisp/cedet/semantic-utest-ia-resources/testwisent.wy:
    ...to here.
---
 .../cedet/semantic-utest-ia-resources}/test.mk     |  0
 .../cedet/semantic-utest-ia-resources}/test.srt    |  0
 .../cedet/semantic-utest-ia-resources}/test.texi   |  0
 .../semantic-utest-ia-resources}/testdoublens.cpp  |  0
 .../semantic-utest-ia-resources}/testdoublens.hpp  |  0
 .../semantic-utest-ia-resources}/testfriends.cpp   |  1 -
 .../semantic-utest-ia-resources}/testjavacomp.java |  0
 .../semantic-utest-ia-resources}/testlocalvars.cpp |  0
 .../cedet/semantic-utest-ia-resources}/testnsp.cpp |  0
 .../semantic-utest-ia-resources}/testsppcomplete.c |  0
 .../semantic-utest-ia-resources}/teststruct.cpp    |  0
 .../semantic-utest-ia-resources}/testsubclass.cpp  |  0
 .../semantic-utest-ia-resources}/testsubclass.hh   |  0
 .../semantic-utest-ia-resources}/testtemplates.cpp |  0
 .../semantic-utest-ia-resources}/testtypedefs.cpp  |  0
 .../semantic-utest-ia-resources}/testusing.cpp     |  0
 .../semantic-utest-ia-resources}/testusing.hh      |  0
 .../semantic-utest-ia-resources}/testvarnames.c    |  0
 .../semantic-utest-ia-resources}/testvarnames.java |  0
 .../semantic-utest-ia-resources}/testwisent.wy     |  0
 test/lisp/cedet/semantic-utest-ia.el               | 71 +++++++---------------
 21 files changed, 22 insertions(+), 50 deletions(-)

diff --git a/test/manual/cedet/tests/test.mk 
b/test/lisp/cedet/semantic-utest-ia-resources/test.mk
similarity index 100%
rename from test/manual/cedet/tests/test.mk
rename to test/lisp/cedet/semantic-utest-ia-resources/test.mk
diff --git a/test/manual/cedet/tests/test.srt 
b/test/lisp/cedet/semantic-utest-ia-resources/test.srt
similarity index 100%
rename from test/manual/cedet/tests/test.srt
rename to test/lisp/cedet/semantic-utest-ia-resources/test.srt
diff --git a/test/manual/cedet/tests/test.texi 
b/test/lisp/cedet/semantic-utest-ia-resources/test.texi
similarity index 100%
rename from test/manual/cedet/tests/test.texi
rename to test/lisp/cedet/semantic-utest-ia-resources/test.texi
diff --git a/test/manual/cedet/tests/testdoublens.cpp 
b/test/lisp/cedet/semantic-utest-ia-resources/testdoublens.cpp
similarity index 100%
rename from test/manual/cedet/tests/testdoublens.cpp
rename to test/lisp/cedet/semantic-utest-ia-resources/testdoublens.cpp
diff --git a/test/manual/cedet/tests/testdoublens.hpp 
b/test/lisp/cedet/semantic-utest-ia-resources/testdoublens.hpp
similarity index 100%
rename from test/manual/cedet/tests/testdoublens.hpp
rename to test/lisp/cedet/semantic-utest-ia-resources/testdoublens.hpp
diff --git a/test/manual/cedet/tests/testfriends.cpp 
b/test/lisp/cedet/semantic-utest-ia-resources/testfriends.cpp
similarity index 99%
rename from test/manual/cedet/tests/testfriends.cpp
rename to test/lisp/cedet/semantic-utest-ia-resources/testfriends.cpp
index 20425f9..f84ed5a 100644
--- a/test/manual/cedet/tests/testfriends.cpp
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testfriends.cpp
@@ -35,4 +35,3 @@ int B::testB() {
 
 int B::testAB() { // %1% ( ( "testfriends.cpp" ) ( "B" "B::testAB" ) )
 }
-
diff --git a/test/manual/cedet/tests/testjavacomp.java 
b/test/lisp/cedet/semantic-utest-ia-resources/testjavacomp.java
similarity index 100%
rename from test/manual/cedet/tests/testjavacomp.java
rename to test/lisp/cedet/semantic-utest-ia-resources/testjavacomp.java
diff --git a/test/manual/cedet/tests/testlocalvars.cpp 
b/test/lisp/cedet/semantic-utest-ia-resources/testlocalvars.cpp
similarity index 100%
rename from test/manual/cedet/tests/testlocalvars.cpp
rename to test/lisp/cedet/semantic-utest-ia-resources/testlocalvars.cpp
diff --git a/test/manual/cedet/tests/testnsp.cpp 
b/test/lisp/cedet/semantic-utest-ia-resources/testnsp.cpp
similarity index 100%
rename from test/manual/cedet/tests/testnsp.cpp
rename to test/lisp/cedet/semantic-utest-ia-resources/testnsp.cpp
diff --git a/test/manual/cedet/tests/testsppcomplete.c 
b/test/lisp/cedet/semantic-utest-ia-resources/testsppcomplete.c
similarity index 100%
rename from test/manual/cedet/tests/testsppcomplete.c
rename to test/lisp/cedet/semantic-utest-ia-resources/testsppcomplete.c
diff --git a/test/manual/cedet/tests/teststruct.cpp 
b/test/lisp/cedet/semantic-utest-ia-resources/teststruct.cpp
similarity index 100%
rename from test/manual/cedet/tests/teststruct.cpp
rename to test/lisp/cedet/semantic-utest-ia-resources/teststruct.cpp
diff --git a/test/manual/cedet/tests/testsubclass.cpp 
b/test/lisp/cedet/semantic-utest-ia-resources/testsubclass.cpp
similarity index 100%
rename from test/manual/cedet/tests/testsubclass.cpp
rename to test/lisp/cedet/semantic-utest-ia-resources/testsubclass.cpp
diff --git a/test/manual/cedet/tests/testsubclass.hh 
b/test/lisp/cedet/semantic-utest-ia-resources/testsubclass.hh
similarity index 100%
rename from test/manual/cedet/tests/testsubclass.hh
rename to test/lisp/cedet/semantic-utest-ia-resources/testsubclass.hh
diff --git a/test/manual/cedet/tests/testtemplates.cpp 
b/test/lisp/cedet/semantic-utest-ia-resources/testtemplates.cpp
similarity index 100%
rename from test/manual/cedet/tests/testtemplates.cpp
rename to test/lisp/cedet/semantic-utest-ia-resources/testtemplates.cpp
diff --git a/test/manual/cedet/tests/testtypedefs.cpp 
b/test/lisp/cedet/semantic-utest-ia-resources/testtypedefs.cpp
similarity index 100%
rename from test/manual/cedet/tests/testtypedefs.cpp
rename to test/lisp/cedet/semantic-utest-ia-resources/testtypedefs.cpp
diff --git a/test/manual/cedet/tests/testusing.cpp 
b/test/lisp/cedet/semantic-utest-ia-resources/testusing.cpp
similarity index 100%
rename from test/manual/cedet/tests/testusing.cpp
rename to test/lisp/cedet/semantic-utest-ia-resources/testusing.cpp
diff --git a/test/manual/cedet/tests/testusing.hh 
b/test/lisp/cedet/semantic-utest-ia-resources/testusing.hh
similarity index 100%
rename from test/manual/cedet/tests/testusing.hh
rename to test/lisp/cedet/semantic-utest-ia-resources/testusing.hh
diff --git a/test/manual/cedet/tests/testvarnames.c 
b/test/lisp/cedet/semantic-utest-ia-resources/testvarnames.c
similarity index 100%
rename from test/manual/cedet/tests/testvarnames.c
rename to test/lisp/cedet/semantic-utest-ia-resources/testvarnames.c
diff --git a/test/manual/cedet/tests/testvarnames.java 
b/test/lisp/cedet/semantic-utest-ia-resources/testvarnames.java
similarity index 100%
rename from test/manual/cedet/tests/testvarnames.java
rename to test/lisp/cedet/semantic-utest-ia-resources/testvarnames.java
diff --git a/test/manual/cedet/tests/testwisent.wy 
b/test/lisp/cedet/semantic-utest-ia-resources/testwisent.wy
similarity index 100%
rename from test/manual/cedet/tests/testwisent.wy
rename to test/lisp/cedet/semantic-utest-ia-resources/testwisent.wy
diff --git a/test/lisp/cedet/semantic-utest-ia.el 
b/test/lisp/cedet/semantic-utest-ia.el
index 7210f66..122c431 100644
--- a/test/lisp/cedet/semantic-utest-ia.el
+++ b/test/lisp/cedet/semantic-utest-ia.el
@@ -30,121 +30,94 @@
 ;; (Replace // with contents of comment-start for the language being tested.)
 
 ;;; Code:
+(require 'ert)
+(require 'ert-x)
 (require 'semantic)
 (require 'semantic/analyze)
 (require 'semantic/analyze/refs)
 (require 'semantic/symref)
 (require 'semantic/symref/filter)
 
-(defvar cedet-utest-directory
-  (let* ((C (file-name-directory (locate-library "cedet")))
-         (D (expand-file-name "../../test/manual/cedet/" C)))
-    D)
-  "Location of test files for this test suite.")
-
-(defvar semantic-utest-test-directory (expand-file-name "tests" 
cedet-utest-directory)
-  "Location of test files.")
-
 (ert-deftest semantic-utest-ia-doublens.cpp ()
-  (let ((tst (expand-file-name "testdoublens.cpp" 
semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "testdoublens.cpp")))
     (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-subclass.cpp ()
-  (let ((tst (expand-file-name "testsubclass.cpp" 
semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "testsubclass.cpp")))
     (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-typedefs.cpp ()
-  (let ((tst (expand-file-name "testtypedefs.cpp" 
semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "testtypedefs.cpp")))
     (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-struct.cpp ()
-  (let ((tst (expand-file-name "teststruct.cpp" 
semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "teststruct.cpp")))
     (should-not (semantic-ia-utest tst))))
 
 ;;(ert-deftest semantic-utest-ia-union.cpp ()
-;;  (let ((tst (expand-file-name "testunion.cpp" 
semantic-utest-test-directory)))
-;;    (should (file-exists-p tst))
+;;  (let ((tst (ert-resource-file "testunion.cpp")))
 ;;    (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-templates.cpp ()
-  (let ((tst (expand-file-name "testtemplates.cpp" 
semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "testtemplates.cpp")))
     (should-not (semantic-ia-utest tst))))
 
 ;;(ert-deftest semantic-utest-ia-friends.cpp ()
-;;  (let ((tst (expand-file-name "testfriends.cpp" 
semantic-utest-test-directory)))
-;;    (should (file-exists-p tst))
+;;  (let ((tst (ert-resource-file "testfriends.cpp")))
 ;;    (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-using.cpp ()
-  (let ((tst (expand-file-name "testusing.cpp" semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "testusing.cpp")))
     (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-nsp.cpp ()
   (skip-unless (executable-find "g++"))
-  (let ((tst (expand-file-name "testnsp.cpp" semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "testnsp.cpp")))
     (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-localvars.cpp ()
-  (let ((tst (expand-file-name "testlocalvars.cpp" 
semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "testlocalvars.cpp")))
     (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-namespace.cpp ()
   (skip-unless (executable-find "g++"))
-  (let ((tst (expand-file-name "testnsp.cpp" semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "testnsp.cpp")))
     (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-sppcomplete.c ()
-  (let ((tst (expand-file-name "testsppcomplete.c" 
semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "testsppcomplete.c")))
     (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-varnames.c ()
-  (let ((tst (expand-file-name "testvarnames.c" 
semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "testvarnames.c")))
     (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-javacomp.java ()
-  (let ((tst (expand-file-name "testjavacomp.java" 
semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "testjavacomp.java")))
     (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-varnames.java ()
-  (let ((tst (expand-file-name "testvarnames.java" 
semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "testvarnames.java")))
     (should-not (semantic-ia-utest tst))))
 
 ;;(ert-deftest semantic-utest-ia-f90.f90 ()
-;;  (let ((tst (expand-file-name "testf90.f90" semantic-utest-test-directory)))
-;;    (should (file-exists-p tst))
+;;  (let ((tst (ert-resource-file "testf90.f90")))
 ;;    (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-wisent.wy ()
-  (let ((tst (expand-file-name "testwisent.wy" semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "testwisent.wy")))
     (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-texi ()
-  (let ((tst (expand-file-name "test.texi" semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "test.texi")))
     (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-make ()
-  (let ((tst (expand-file-name "test.mk" semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "test.mk")))
     (should-not (semantic-ia-utest tst))))
 
 (ert-deftest semantic-utest-ia-srecoder ()
-  (let ((tst (expand-file-name "test.srt" semantic-utest-test-directory)))
-    (should (file-exists-p tst))
+  (let ((tst (ert-resource-file "test.srt")))
     (should-not (semantic-ia-utest tst))))
 
 ;;; Core testing utility



reply via email to

[Prev in Thread] Current Thread [Next in Thread]