-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest_colorname_overlap.m
64 lines (54 loc) · 1.08 KB
/
test_colorname_overlap.m
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
colorname_overlap()
function colorname_overlap()
disp('TESTING <X11|xkcd> overlap [+rgb]')
colorlab.enter
close all
clear
A = rgb.X11('list');
B = rgb.xkcd('list');
computed_overlap = intersect(A,B);
disp overlap:
disp(computed_overlap)
assert(isequal(computed_overlap,reference_overlap),'overlap has changed')
disp('>> All good!')
disp('------------')
end
function list = reference_overlap()
list = {
'aquamarine',
'azure' ,
'beige' ,
'black' ,
'blue' ,
'brown' ,
'chartreuse',
'chocolate' ,
'coral' ,
'cyan' ,
'gold' ,
'goldenrod' ,
'green' ,
'grey' ,
'ivory' ,
'khaki' ,
'lavender' ,
'magenta' ,
'maroon' ,
'navy' ,
'orange' ,
'orchid' ,
'pink' ,
'plum' ,
'purple' ,
'red' ,
'salmon' ,
'sienna' ,
'tan' ,
'tomato' ,
'turquoise' ,
'violet' ,
'wheat' ,
'white' ,
'yellow'
};
end