summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-02-10 12:44:07 +0100
committerStefan Kangas <stefan@marxist.se>2021-02-10 13:00:20 +0100
commit4786353b2abc756d3fd6bda016859b40ba9aca8a (patch)
tree0fded0a74651e3b92578f841b58c82444fa6a067
parent62ee5999a725b0561c625277e3756657de9e4360 (diff)
downloademacs-4786353b2abc756d3fd6bda016859b40ba9aca8a.tar.gz
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.
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/test.mk (renamed from test/manual/cedet/tests/test.mk)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/test.srt (renamed from test/manual/cedet/tests/test.srt)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/test.texi (renamed from test/manual/cedet/tests/test.texi)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testdoublens.cpp (renamed from test/manual/cedet/tests/testdoublens.cpp)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testdoublens.hpp (renamed from test/manual/cedet/tests/testdoublens.hpp)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testfriends.cpp (renamed from test/manual/cedet/tests/testfriends.cpp)1
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testjavacomp.java (renamed from test/manual/cedet/tests/testjavacomp.java)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testlocalvars.cpp (renamed from test/manual/cedet/tests/testlocalvars.cpp)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testnsp.cpp (renamed from test/manual/cedet/tests/testnsp.cpp)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testsppcomplete.c (renamed from test/manual/cedet/tests/testsppcomplete.c)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/teststruct.cpp (renamed from test/manual/cedet/tests/teststruct.cpp)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testsubclass.cpp (renamed from test/manual/cedet/tests/testsubclass.cpp)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testsubclass.hh (renamed from test/manual/cedet/tests/testsubclass.hh)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testtemplates.cpp (renamed from test/manual/cedet/tests/testtemplates.cpp)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testtypedefs.cpp (renamed from test/manual/cedet/tests/testtypedefs.cpp)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testusing.cpp (renamed from test/manual/cedet/tests/testusing.cpp)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testusing.hh (renamed from test/manual/cedet/tests/testusing.hh)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testvarnames.c (renamed from test/manual/cedet/tests/testvarnames.c)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testvarnames.java (renamed from test/manual/cedet/tests/testvarnames.java)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testwisent.wy (renamed from test/manual/cedet/tests/testwisent.wy)0
-rw-r--r--test/lisp/cedet/semantic-utest-ia.el71
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
index edea97e7b98..edea97e7b98 100644
--- a/test/manual/cedet/tests/test.mk
+++ b/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
index 38e6f9ed7b7..38e6f9ed7b7 100644
--- a/test/manual/cedet/tests/test.srt
+++ b/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
index 37d303c8b48..37d303c8b48 100644
--- a/test/manual/cedet/tests/test.texi
+++ b/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
index ea3afc72a69..ea3afc72a69 100644
--- a/test/manual/cedet/tests/testdoublens.cpp
+++ b/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
index e8c9b345b28..e8c9b345b28 100644
--- a/test/manual/cedet/tests/testdoublens.hpp
+++ b/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
index 20425f93afa..f84ed5a2190 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
index bfc016903c8..bfc016903c8 100644
--- a/test/manual/cedet/tests/testjavacomp.java
+++ b/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
index 9d2329a0fa8..9d2329a0fa8 100644
--- a/test/manual/cedet/tests/testlocalvars.cpp
+++ b/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
index db1603cead2..db1603cead2 100644
--- a/test/manual/cedet/tests/testnsp.cpp
+++ b/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
index 084d6a8687d..084d6a8687d 100644
--- a/test/manual/cedet/tests/testsppcomplete.c
+++ b/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
index 6659b5557b8..6659b5557b8 100644
--- a/test/manual/cedet/tests/teststruct.cpp
+++ b/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
index 409950cce2f..409950cce2f 100644
--- a/test/manual/cedet/tests/testsubclass.cpp
+++ b/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
index 5d795b32b10..5d795b32b10 100644
--- a/test/manual/cedet/tests/testsubclass.hh
+++ b/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
index ed7a057df0b..ed7a057df0b 100644
--- a/test/manual/cedet/tests/testtemplates.cpp
+++ b/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
index c82535f9581..c82535f9581 100644
--- a/test/manual/cedet/tests/testtypedefs.cpp
+++ b/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
index 6f6c8542633..6f6c8542633 100644
--- a/test/manual/cedet/tests/testusing.cpp
+++ b/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
index d3b690f8542..d3b690f8542 100644
--- a/test/manual/cedet/tests/testusing.hh
+++ b/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
index e796eb285c6..e796eb285c6 100644
--- a/test/manual/cedet/tests/testvarnames.c
+++ b/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
index 7ed9785fc07..7ed9785fc07 100644
--- a/test/manual/cedet/tests/testvarnames.java
+++ b/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
index 49eb5780f4b..49eb5780f4b 100644
--- a/test/manual/cedet/tests/testwisent.wy
+++ b/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 7210f66b0a7..122c431d472 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