test-operation-classes.script 1.53 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
;;; -*- Lisp -*-

;;;---------------------------------------------------------------------------
;;; Test that we can successfully create new subclasses of OPERATION and that we
;;; can detect bad subclasses of OPERATION.
;;;---------------------------------------------------------------------------


(in-package :asdf)
(use-package :asdf-test)

(defparameter *good-classes*
  '(build-op
    prepare-source-op
    prepare-op
    prepare-fasl-op
    load-op
    monolithic-load-compiled-concatenated-source-op
    prepare-fasl-op
    load-source-op
    load-compiled-concatenated-source-op
    monolithic-load-concatenated-source-op
    load-concatenated-source-op
    load-fasl-op
    compile-op
    compile-concatenated-source-op
    test-op
    fasl-op
    program-op
    monolithic-compile-concatenated-source-op
    monolithic-dll-op
    monolithic-binary-op
    monolithic-fasl-op
    dll-op
    concatenate-source-op
    monolithic-lib-op
    monolithic-concatenate-source-op
    lib-op)
  "All of these classes should be instantiable without error.")

(defclass my-unupdated-operation (operation)
  ()
  )

(defclass my-good-operation (downward-operation)
  ()
  )

(defclass my-incoherent-operation (downward-operation non-propagating-operation)
  ()
  )

(loop :for class :in *good-classes*
      :do (assert (make-instance class)))

56
57
(signals operation-definition-warning
         (make-instance 'my-unupdated-operation))
58

59
60
(signals operation-definition-error
         (make-instance 'my-incoherent-operation))
61
62

(assert (make-instance 'my-good-operation))