[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 7baacd5 196/459: Make imenu-tests less verb
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 7baacd5 196/459: Make imenu-tests less verbose. |
Date: |
Sun, 22 Aug 2021 13:59:26 -0400 (EDT) |
branch: externals/csharp-mode
commit 7baacd5650972f8ed2960f5c798cb3cbfc5811d3
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Make imenu-tests less verbose.
---
csharp-mode-tests.el | 66 +++++++++++++++++++++++++---------------------------
1 file changed, 32 insertions(+), 34 deletions(-)
diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el
index da233b5..98bda72 100644
--- a/csharp-mode-tests.el
+++ b/csharp-mode-tests.el
@@ -176,14 +176,6 @@
(equal expected (match-string 1)))))
(kill-buffer buffer))))
-(defmacro def-imenutest (testname filename index &rest body)
- `(ert-deftest ,testname ()
- (let* ((find-file-hook nil) ;; avoid vc-mode file-hooks when opening!
- (buffer (find-file-read-only ,filename))
- (,index (csharp--imenu-create-index-function)))
- ,@body
- (kill-buffer buffer))))
-
(defun imenu-get-item (index haystack)
(let ((result))
(dolist (item index)
@@ -196,45 +188,51 @@
(setq result (imenu-get-item value haystack)))))))
result))
+(defmacro def-imenutest (testname filename &rest items)
+ `(ert-deftest ,testname ()
+ (let* ((find-file-hook nil) ;; avoid vc-mode file-hooks when opening!
+ (buffer (find-file-read-only ,filename))
+ (index (csharp--imenu-create-index-function)))
+ (dolist (item ',items)
+ (should (imenu-get-item index item)))
+ (kill-buffer buffer))))
+
(def-imenutest imenu-parsing-supports-generic-parameters
- "./test-files/imenu-generics-test.cs" imenu-index
- (dolist (item '("NoGeneric(" "OneGeneric<T>(" "TwoGeneric<T1,T2>("))
- (should (imenu-get-item imenu-index (concat "(method) " item)))))
+ "./test-files/imenu-generics-test.cs"
+ "(method) NoGeneric(" "(method) OneGeneric<T>(" "(method)
TwoGeneric<T1,T2>(")
(def-imenutest imenu-parsing-supports-comments
- "./test-files/imenu-comment-test.cs" imenu-index
- (dolist (item '("HasNoComment(" "HasComment(" "CommentedToo("))
- (should (imenu-get-item imenu-index (concat "(method) " item)))))
+ "./test-files/imenu-comment-test.cs"
+ "(method) HasNoComment(" "(method) HasComment(" "(method) CommentedToo(")
(def-imenutest imenu-parsing-supports-explicit-interface-properties
- "./test-files/imenu-interface-property-test.cs" imenu-index
- (should (imenu-get-item imenu-index "(prop) IImenuTest.InterfaceString")))
+ "./test-files/imenu-interface-property-test.cs"
+ "(prop) IImenuTest.InterfaceString")
(def-imenutest imenu-parsing-supports-explicit-interface-methods
- "./test-files/imenu-interface-property-test.cs" imenu-index
- (should (imenu-get-item imenu-index "(method) IImenuTest.MethodName")))
+ "./test-files/imenu-interface-property-test.cs"
+ "(method) IImenuTest.MethodName")
(def-imenutest imenu-parsing-provides-types-with-namespace-names
- "./test-files/imenu-namespace-test.cs" imenu-index
- (should (imenu-get-item imenu-index "class ImenuTest.ImenuTestClass"))
- (should (imenu-get-item imenu-index "interface
ImenuTest.ImenuTestInterface"))
- (should (imenu-get-item imenu-index "enum ImenuTest.ImenuTestEnum")))
+ "./test-files/imenu-namespace-test.cs"
+ "class ImenuTest.ImenuTestClass"
+ "interface ImenuTest.ImenuTestInterface"
+ "enum ImenuTest.ImenuTestEnum")
(def-imenutest imenu-parsing-supports-fields-keywords
- "./test-files/imenu-field-keyword-test.cs" imenu-index
- (should (imenu-get-item imenu-index "(field) TestBool"))
- (should (imenu-get-item imenu-index "(field) CommentedField"))
- (should (imenu-get-item imenu-index "(field) _MultiLineComment"))
- (should (imenu-get-item imenu-index "(field) VolatileTest")))
+ "./test-files/imenu-field-keyword-test.cs"
+ "(field) TestBool"
+ "(field) CommentedField"
+ "(field) _MultiLineComment"
+ "(field) VolatileTest")
(def-imenutest imenu-parsing-supports-method-keywords
- "./test-files/imenu-method-test.cs" imenu-index
- (should (imenu-get-item imenu-index "(method) GetTickCount64("))
- (should (imenu-get-item imenu-index "(method) OpenWebServiceAsync("))
- (should (imenu-get-item imenu-index "(method) ToString("))
- (should (imenu-get-item imenu-index "(method) AbstractMethod("))
- (should (imenu-get-item imenu-index "(method) UnsafeCopy(")))
-
+ "./test-files/imenu-method-test.cs"
+ "(method) GetTickCount64("
+ "(method) OpenWebServiceAsync("
+ "(method) ToString("
+ "(method) AbstractMethod("
+ "(method) UnsafeCopy(")
(ert-deftest imenu-indexing-resolves-correct-container ()
(let* ((testcase-no-namespace '( ("class Global" . 10)
- [elpa] externals/csharp-mode e2c9f85 181/459: New imenu-implementation for csharp-mode., (continued)
- [elpa] externals/csharp-mode e2c9f85 181/459: New imenu-implementation for csharp-mode., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 7943738 182/459: Add volatile keyword, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b4b9d61 183/459: Add volatile to imenu, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 9a1ddba 185/459: Merge branch 'jtbm37/master', ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode a8def67 186/459: Add missing test-file. Fix build., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b609f42 187/459: New imenu test-file for method-indexing., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b448614 190/459: Fix fontification of methods found in test-file., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 4a396e3 189/459: Add tests for imenu method-indexing., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 9c42dac 193/459: Move all defcustoms to the top., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 717bf76 194/459: Fix compilation errors and warnings., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 7baacd5 196/459: Make imenu-tests less verbose.,
ELPA Syncer <=
- [elpa] externals/csharp-mode 9616fd0 192/459: Fix method-name fontification tests., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 04958ec 198/459: Fix byte-compilation warnings., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 49a957b 199/459: Super-ugly hacks to fix build., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode aa4e5db 201/459: Escape both quoting and quoted double quote, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 48dd7ee 202/459: Remove empty line at file start, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 803a362 203/459: Move log functions back down where they were., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 8a9ab5a 204/459: imenu: Add test-cases for generic methods., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b56c250 205/459: Add fontification tests for generic methods., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f83e2e3 207/459: Fix indentation of generic type-initializers., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 81cf94d 214/459: Update test-data., ELPA Syncer, 2021/08/22