summaryrefslogtreecommitdiffstats
path: root/src/base/test/colour.output
blob: d6dc301d01419c303387488175610aaf52a27ca4 (plain)
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
TEST: Colour.C

Can we create an Colour with the right default values?
red:  0 green: 0 blue:  0
Can we set values; green here is invalid - it should be set to 0 instead
Testing the copy constructor
red:  210 green: 0 blue:  100
Check operator= works
red:  210 green: 0 blue:  100
Check the setColour routine
red:  1 green: 2 blue:  3
Check the getColour routine
red:  1 green: 2 blue:  3

TEST: ColourMap.C

Can we create a ColourMap with the right default Colour + String
Can we get the default colour back out of it?
name:   red:  197 green: 211 blue:  125
Can we create a ColourMap with a specified default Colour?
Can we get the information back out of it?
name:   red:  210 green: 0 blue:  100
Can we add a Colour
Can we get the info back out?
name: TEST1  red:  100 green: 101 blue:  102
Add a couple more colours
index:  0  name:   red:  210 green: 0 blue:  100
index:  1  name: TEST1  red:  100 green: 101 blue:  102
index:  2  name: TEST2  red:  101 green: 102 blue:  103
index:  3  name: TEST3  red:  102 green: 103 blue:  104
index:  4  name: TEST4  red:  103 green: 104 blue:  105
Now try deleting the third item
index:  0  name:   red:  210 green: 0 blue:  100
index:  1  name: TEST1  red:  100 green: 101 blue:  102
index:  2  name: TEST2  red:  101 green: 102 blue:  103
index:  4  name: TEST4  red:  103 green: 104 blue:  105
Make sure we get false when we try and modify item number 3
Check we can modify a colour which *is* there
index:  0  name:   red:  210 green: 0 blue:  100
index:  1  name: TEST1  red:  100 green: 101 blue:  102
index:  2  name: TEST2  red:  101 green: 102 blue:  103
index:  4  name: YES  red:  233 green: 233 blue:  233
Now try adding another item - it should take the place of the one we removed.
index:  0  name:   red:  210 green: 0 blue:  100
index:  1  name: TEST1  red:  100 green: 101 blue:  102
index:  2  name: TEST2  red:  101 green: 102 blue:  103
index:  3  name: NEW  red:  211 green: 212 blue:  213
index:  4  name: YES  red:  233 green: 233 blue:  233
Try swapping two items:
index:  0  name:   red:  210 green: 0 blue:  100
index:  1  name: TEST1  red:  100 green: 101 blue:  102
index:  2  name: TEST2  red:  101 green: 102 blue:  103
index:  3  name: YES  red:  233 green: 233 blue:  233
index:  4  name: NEW  red:  211 green: 212 blue:  213

TEST: Generic Colour routines

Try getting a combination colour:
Original colours:
red:  210 green: 0 blue:  100
red:  100 green: 101 blue:  102
Combination colour:
red:  155 green: 50 blue:  101

TEST: XML Output

For a single colour:
<colour red="155" green="50" blue="101"/>
For a colourmap:
        <colourmap name="segmentmap">
              <colourpair id="0" name="" red="210" green="0" blue="100"/>
              <colourpair id="1" name="TEST1" red="100" green="101" blue="102"/>
              <colourpair id="2" name="TEST2" red="101" green="102" blue="103"/>
              <colourpair id="3" name="YES" red="233" green="233" blue="233"/>
              <colourpair id="4" name="NEW" red="211" green="212" blue="213"/>
        </colourmap>