From 8844b8d46c0c88edeabf6ddb93e8265b451c01bf Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <tunes@google.com> Date: Wed, 12 Feb 2014 16:00:27 -0500 Subject: [PATCH] Add a test for backward-compatible propagation of operation classes. Anton Vodonosov found that the backward-compatibility kluge was broken and tried to compute the component-children of non-parent components. --- test/test-operation-classes.script | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/test-operation-classes.script b/test/test-operation-classes.script index fac4006ab..1d5698702 100644 --- a/test/test-operation-classes.script +++ b/test/test-operation-classes.script @@ -57,3 +57,17 @@ (make-instance 'my-incoherent-operation)) (assert (make-instance 'my-good-operation)) + + +;; This test exercises the backward-compatibility mechanism of operation, +;; whereby traditional unqualified operations are implicitly downward and sideward +(defclass trivial-operation (operation) ()) + +(assert-equal + (loop :for (o . c) :in (traverse 'trivial-operation '(:test-asdf/test-module-depend "quux")) + :collect (cons (type-of o) (component-find-path c))) + '((trivial-operation "test-asdf/test-module-depend" "file1") + (trivial-operation "test-asdf/test-module-depend" "quux" "file2") + (trivial-operation "test-asdf/test-module-depend" "quux" "file3mod" "file3") + (trivial-operation "test-asdf/test-module-depend" "quux" "file3mod") + (trivial-operation "test-asdf/test-module-depend" "quux"))) -- GitLab