File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -14,24 +14,24 @@ header:
1414
1515test: "comparison of difference to zero refactorable to direct > comparison "
1616- (> (- x y) 0 )
17- - (<= 0 (- x y))
17+ - (< 0 (- x y))
1818- (> x y)
1919
2020
2121test: "comparison of difference to zero refactorable to direct < comparison "
2222- (< (- x y) 0 )
23- - (>= 0 (- x y))
23+ - (> 0 (- x y))
2424- (< x y)
2525
2626
2727test: "comparison of difference to zero refactorable to direct >= comparison "
28- - (< 0 (- x y))
28+ - (<= 0 (- x y))
2929- (>= (- x y) 0 )
3030- (>= x y)
3131
3232
3333test: "comparison of difference to zero refactorable to direct <= comparison "
34- - (> 0 (- x y))
34+ - (>= 0 (- x y))
3535- (<= (- x y) 0 )
3636- (<= x y)
3737
Original file line number Diff line number Diff line change 2525 (pattern (< (- x y) 0 ) #:with direct-comparison #'(< x y))
2626 (pattern (>= (- x y) 0 ) #:with direct-comparison #'(>= x y))
2727 (pattern (<= (- x y) 0 ) #:with direct-comparison #'(<= x y))
28- (pattern (> 0 (- x y)) #:with direct-comparison #'(<= x y))
29- (pattern (< 0 (- x y)) #:with direct-comparison #'(>= x y))
30- (pattern (>= 0 (- x y)) #:with direct-comparison #'(< x y))
31- (pattern (<= 0 (- x y)) #:with direct-comparison #'(> x y)))
28+ (pattern (> 0 (- x y)) #:with direct-comparison #'(< x y))
29+ (pattern (< 0 (- x y)) #:with direct-comparison #'(> x y))
30+ (pattern (>= 0 (- x y)) #:with direct-comparison #'(<= x y))
31+ (pattern (<= 0 (- x y)) #:with direct-comparison #'(>= x y)))
3232
3333
3434(define-refactoring-rule comparison-of-difference-and-zero-to-direct-comparison
You can’t perform that action at this time.
0 commit comments