Skip to content

Commit

Permalink
Put header on test-helper.el. Also minor rewrite of headers
Browse files Browse the repository at this point in the history
  • Loading branch information
themkat committed Apr 6, 2024
1 parent b54350c commit 9df90d3
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
4 changes: 3 additions & 1 deletion test/go-test.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
;;; go-test.el --- Go language tests for codemetrics.el -*- lexical-binding: t; -*-

;; Copyright (C) 2024 Shen, Jen-Chieh
;; Copyright (C) 2024 Marie Katrine Ekeberg

;; Author: Marie Katrine Ekeberg <mke@themkat.net>

;; 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
Expand Down
4 changes: 3 additions & 1 deletion test/kotlin-test.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
;;; kotlin-test.el --- Kotlin language tests for codemetrics.el -*- lexical-binding: t; -*-

;; Copyright (C) 2024 Shen, Jen-Chieh
;; Copyright (C) 2024 Marie Katrine Ekeberg

;; Author: Marie Katrine Ekeberg <mke@themkat.net>

;; 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
Expand Down
25 changes: 25 additions & 0 deletions test/test-helper.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
;;; test-helper.el --- General test utilities for codemetrics.el -*- lexical-binding: t; -*-

;; Copyright (C) 2024 Marie Katrine Ekeberg

;; Author: Marie Katrine Ekeberg <mke@themkat.net>

;; 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 3 of the License, 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. If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:
;;

;;; Code:
(require 'dash)

(defmacro codemetrics-test (test-name file major-mode expected-result)
Expand All @@ -20,3 +43,5 @@ Expecting result EXPECTED-RESULT."
(--map (cons (tsc-node-type (car it))
(nth 2 it))
(cdr analyze-result)))

;;; test-helper.el ends here

0 comments on commit 9df90d3

Please sign in to comment.