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 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 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 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