Skip to content

Commit

Permalink
Add extra indentation test cases for records and protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
axvr committed Sep 22, 2024
1 parent 083f554 commit f271dca
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions clj/resources/indent-test-cases/custom_types/in.clj
Original file line number Diff line number Diff line change
@@ -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))))
20 changes: 20 additions & 0 deletions clj/resources/indent-test-cases/custom_types/out.clj
Original file line number Diff line number Diff line change
@@ -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))))

0 comments on commit f271dca

Please sign in to comment.