File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
src/lambdaisland/deep_diff
test/lambdaisland/deep_diff Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 119119 (assoc k (diff (get exp k) (get act k)))
120120
121121 (contains? ins idx)
122- (into (map (juxt ->Insertion act)) (get ins idx)))
122+ (into (map (juxt ->Insertion ( partial get act) )) (get ins idx)))
123123 (inc idx)])
124124 [(if (contains? ins -1 )
125- (into {} (map (juxt ->Insertion act)) (get ins -1 ))
125+ (into {} (map (juxt ->Insertion ( partial get act) )) (get ins -1 ))
126126 {}) 0 ]
127127 exp-ks))))
128128
Original file line number Diff line number Diff line change 1414 #'diff/del+ins]]
1515 (alter-meta! v dissoc :private ))
1616
17- (defrecord ARecord [a ])
17+ (defrecord ARecord [])
1818
1919(deftest diff-test
2020 (testing " diffing atoms"
102102
103103 (testing " records"
104104 (is (= {:a (diff/->Mismatch 1 2 )}
105- (diff/diff (->ARecord 1 ) (->ARecord 2 ))))))
105+ (diff/diff (map->ARecord {:a 1 }) (map->ARecord {:a 2 }))))
106+ (is (= {(diff/->Insertion :a ) 1 }
107+ (diff/diff (map->ARecord {}) (map->ARecord {:a 1 }))))))
106108
107109 (is (= [{:x (diff/->Mismatch 1 2 )}]
108110 (diff/diff [{:x 1 }] [{:x 2 }])))
You can’t perform that action at this time.
0 commit comments