From f271dca511aa6f458c0ae643f7cec07009beca36 Mon Sep 17 00:00:00 2001 From: Alex Vear Date: Sun, 22 Sep 2024 23:50:00 +0100 Subject: [PATCH] Add extra indentation test cases for records and protocols --- .../indent-test-cases/custom_types/in.clj | 20 +++++++++++++++++++ .../indent-test-cases/custom_types/out.clj | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 clj/resources/indent-test-cases/custom_types/in.clj create mode 100644 clj/resources/indent-test-cases/custom_types/out.clj diff --git a/clj/resources/indent-test-cases/custom_types/in.clj b/clj/resources/indent-test-cases/custom_types/in.clj new file mode 100644 index 0000000..78ff69e --- /dev/null +++ b/clj/resources/indent-test-cases/custom_types/in.clj @@ -0,0 +1,20 @@ +(defrecord Thing [a] + FileNameMap + (getContentTypeFor [_ file-name] + (str a "-" file-name)) + Object + (toString [_] + "My very own thing!!")) + +(defrecord TheNameOfTheRecord + [a pretty long argument list] + SomeType + (assoc [_ x] + (.assoc pretty x 10))) + +(extend-protocol MyProtocol + goog.date.Date +(-to-date-time [x] + (goog.date.UtcDateTime. (.getYear x) + (.getMonth x) + (.getDate x)))) diff --git a/clj/resources/indent-test-cases/custom_types/out.clj b/clj/resources/indent-test-cases/custom_types/out.clj new file mode 100644 index 0000000..18f9241 --- /dev/null +++ b/clj/resources/indent-test-cases/custom_types/out.clj @@ -0,0 +1,20 @@ +(defrecord Thing [a] + FileNameMap + (getContentTypeFor [_ file-name] + (str a "-" file-name)) + Object + (toString [_] + "My very own thing!!")) + +(defrecord TheNameOfTheRecord + [a pretty long argument list] + SomeType + (assoc [_ x] + (.assoc pretty x 10))) + +(extend-protocol MyProtocol + goog.date.Date + (-to-date-time [x] + (goog.date.UtcDateTime. (.getYear x) + (.getMonth x) + (.getDate x))))