Revert "Update README.md"
[lift.git] / test / utilities.lisp
blob4270a8cda7fc99d93ad815939d42312b8ee749a6
1 (in-package #:lift-test)
3 (defun set-equal (list1 list2 &rest args
4 &key test key)
5 "Returns t if list1 and list2 are equal (as sets). If list1 and list2 are not equal returns (as multiple values) nil and two lists. The first list contains the elements in list1 and not in list2 and the second list contains elements in list2 and not in list1."
6 (declare (ignore test key))
7 (let ((in1-not2 (apply #'set-difference list1 list2 args))
8 (in2-not1 (apply #'set-difference list2 list1 args)))
9 (if (or in1-not2 in2-not1)
10 (values nil in1-not2 in2-not1)
11 (values t nil nil))))