2020-05-08 05:58:25 -04:00
|
|
|
;;; lang/java/autoload/lsp.el -*- lexical-binding: t; -*-
|
2022-08-12 20:29:19 +02:00
|
|
|
;;;###if (modulep! :tools debugger +lsp)
|
2020-05-08 05:58:25 -04:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +java/run-test ()
|
|
|
|
"Runs test at point.
|
|
|
|
If in a method, runs the test method, otherwise runs the entire test class."
|
|
|
|
(interactive)
|
2020-08-11 19:21:48 -04:00
|
|
|
(require 'dap-java)
|
2020-05-08 05:58:25 -04:00
|
|
|
(condition-case nil
|
|
|
|
(dap-java-run-test-method)
|
|
|
|
(user-error (dap-java-run-test-class))))
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +java/debug-test ()
|
|
|
|
"Runs test at point in a debugger.
|
|
|
|
If in a method, runs the test method, otherwise runs the entire test class."
|
|
|
|
(interactive)
|
2020-08-11 19:21:48 -04:00
|
|
|
(require 'dap-java)
|
2020-05-08 05:58:25 -04:00
|
|
|
(condition-case nil
|
|
|
|
(call-interactively #'dap-java-debug-test-method)
|
|
|
|
(user-error (call-interactively #'dap-java-debug-test-class))))
|