-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenu-tests.lisp
More file actions
87 lines (78 loc) · 2.46 KB
/
menu-tests.lisp
File metadata and controls
87 lines (78 loc) · 2.46 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
;;; -*- Mode:Lisp; Syntax:ANSI-Common-Lisp; -*-
;;; This file is part of ompw.
;;; Copyright (c) 2007 - 2011, Kilian Sprotte. All rights reserved.
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation, either version 3 of the License, or
;;; (at your option) any later version.
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;; You should have received a copy of the GNU General Public License
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :ompw)
(rtest:deftest menu1
(menu-spec2native '("ks"
("file1" cl:+ cl:-)
("file2" * + / :menu-separator +)
("file3" ("first" * + /) ("second" +))
("file4" * + / ("second" +))))
#+pwgl
(:menu-component
("ks"
("file1" (+ -))
("file2" (* + /) (:menu-component (+)))
("file3" ("first" (* + /)) ("second" (+)))
("file4" (* + /) ("second" (+)))))
#-(or pwgl)
#.(error "do not know how to test this"))
(rtest:deftest menu2
(menu-spec2native '("KS"
("file1" cl:+ cl:-)
("file2" * + /)))
#+pwgl
(:menu-component
("KS"
("file1"
(+ -))
("file2"
(* + /))))
#-(or pwgl)
#.(error "do not know how to test this"))
(rtest:deftest menu3
(menu-spec2native '("Esquisse"
("Intervals"
("Generation" + - +)
("Treatment" subseq append)
("Analysis" list))
("Freq harmony"
("Harm Series" subseq)
("Modulations" list)
("Treatment" + - +)
("Analysis" subseq append :menu-separator +))
("Utilities"
subseq append
:menu-separator
+ - +
:menu-separator
list)))
#+pwgl
(:menu-component
("Esquisse"
("Intervals"
("Generation" (cl:+ cl:- cl:+))
("Treatment" (cl:subseq cl:append))
("Analysis" (cl:list)))
("Freq harmony"
("Harm Series" (cl:subseq))
("Modulations" (cl:list))
("Treatment" (cl:+ cl:- cl:+))
("Analysis" (cl:subseq cl:append)
(:menu-component (cl:+))))
("Utilities" (cl:subseq cl:append)
(:menu-component (cl:+ cl:- cl:+))
(:menu-component (cl:list))
)))
#-(or pwgl)
#.(error "do not know how to test this"))