aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorAndrea Corallo2019-07-21 09:50:18 +0200
committerAndrea Corallo2020-01-01 11:33:56 +0100
commit7726cb254503c2c3d082ffb8aed9c12cbeeec12e (patch)
treedda8fb4f256e3a317316057b746064ed6d784dc0 /test/src
parente25cf441152746a4686ab7adca8d3302e0740189 (diff)
downloademacs-7726cb254503c2c3d082ffb8aed9c12cbeeec12e.tar.gz
emacs-7726cb254503c2c3d082ffb8aed9c12cbeeec12e.zip
bubble sort works again
Diffstat (limited to 'test/src')
-rw-r--r--test/src/comp-tests.el40
1 files changed, 20 insertions, 20 deletions
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index e2a9b1ce49c..4462f35246a 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -334,26 +334,26 @@
334 (error err)) 334 (error err))
335 '(wrong-type-argument consp 3)))) 335 '(wrong-type-argument consp 3))))
336 336
337;; (ert-deftest comp-tests-bubble-sort () 337(ert-deftest comp-tests-bubble-sort ()
338;; "Run bubble sort." 338 "Run bubble sort."
339;; (defun comp-bubble-sort-f (list) 339 (defun comp-bubble-sort-f (list)
340;; (let ((i (length list))) 340 (let ((i (length list)))
341;; (while (> i 1) 341 (while (> i 1)
342;; (let ((b list)) 342 (let ((b list))
343;; (while (cdr b) 343 (while (cdr b)
344;; (when (< (cadr b) (car b)) 344 (when (< (cadr b) (car b))
345;; (setcar b (prog1 (cadr b) 345 (setcar b (prog1 (cadr b)
346;; (setcdr b (cons (car b) (cddr b)))))) 346 (setcdr b (cons (car b) (cddr b))))))
347;; (setq b (cdr b)))) 347 (setq b (cdr b))))
348;; (setq i (1- i))) 348 (setq i (1- i)))
349;; list)) 349 list))
350 350
351;; (native-compile #'comp-bubble-sort-f) 351 (native-compile #'comp-bubble-sort-f)
352 352
353;; (let* ((list1 (mapcar 'random (make-list 1000 most-positive-fixnum))) 353 (let* ((list1 (mapcar 'random (make-list 1000 most-positive-fixnum)))
354;; (list2 (copy-sequence list1))) 354 (list2 (copy-sequence list1)))
355;; (should (equal (comp-bubble-sort-f list1) 355 (should (equal (comp-bubble-sort-f list1)
356;; (sort list2 #'<))))) 356 (sort list2 #'<)))))
357 357
358(ert-deftest comp-tests-list-inline () 358(ert-deftest comp-tests-list-inline ()
359 "Test some inlined list functions." 359 "Test some inlined list functions."