"Eric M. Ludlam" <eric@...> writes:
> Hi Joakim,
>>>> joakim@... seems to think that:
>>I have now added these unit tests:
> I finally had a moment to examine this closely. You have definitely
> captured the key basic components to parsing and a reparse. Great
> I'm going to make a cedet/semantic/utest directory for your creation.
> In doing so, I found an error in semantic-utest-verify-names-2
> referring to a 'tst' function, and I'm not quite certain how it is
> intended to work. Do you know?
I defined this in ielm:
(defun tst (l1 l2) (cond ((eq (car l1) 'overlay) (progn (print
"overlay")(overlayp l2))) ((not (consp l1)) (eq l1 l2)) ((consp l1)
(and (tst (car l1) (car l2)) (tst (cdr l1) (cdr l2)))) (t (print
So this should be correct:
(defun semantic-utest-verify-names-2 (l1 l2)
(cond ( (and (consp l1) (equal (car l1) 'overlay))
((not (consp l1))
(equal l1 l2))
(and (semantic-utest-verify-names-2 (car l1) (car l2)) (semantic-utest-verify-names-2 (cdr l1) (cdr l2))))
(t (error "internal error"))))
I didnt notice that the function wasnt complete, because tst was
defined in ielm.
It just compares the 2 trees recursively, and handles forms begining
with "overlay" specially.
> Eric Ludlam: zappo@..., eric@...
> Home: http://www.ludlam.net Siege: http://www.siege-engine.com
> Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org