Debian Codegraph @

src/tests/keywords/update-add-ref-index

raw
1 #
2 # PRE: update array
3 #
4
5 update request {
6 reply:Filter-Id := "filter"
7 Class := 0x01020304
8 Class += 0x05060708
9 Class += 0x090a0b0c
10 }
11
12 #
13 # Copy all the class attributes to Proxy-State
14 #
15 update request {
16 Proxy-State += &Class[*]
17 }
18
19 if (&Proxy-State[0] != 0x01020304) {
20 update reply {
21 Filter-Id := "fail 0a"
22 }
23 }
24
25 # Must be the same as above
26 if (&Proxy-State[1] != 0x05060708) {
27 update reply {
28 Filter-Id += "fail 0b"
29 }
30 }
31
32 if (&Proxy-State[2] != 0x090a0b0c) {
33 update reply {
34 Filter-Id += "fail 0c"
35 }
36 }
37
38 # must not exist
39 if (&Proxy-State[3]) {
40 update reply {
41 Filter-Id += "fail 1"
42 }
43 }
44
45 # Remove all the Proxy-State attributes
46 update request {
47 Proxy-State !* ANY
48 }
49
50 #
51 # Copy the first instance (implicitly) of class
52 #
53 update request {
54 Proxy-State += &Class
55 }
56
57 if (&Proxy-State[0] != 0x01020304) {
58 update reply {
59 Filter-Id := "fail 2a"
60 }
61 }
62
63 # Must be the same as above
64 if (&Proxy-State[1]) {
65 update reply {
66 Filter-Id += "fail 2b"
67 }
68 }
69
70 # Remove all the Proxy-State attributes
71 update request {
72 Proxy-State !* ANY
73 }
74
75 #
76 # Copy the first instance (explicitly) of class
77 #
78 update request {
79 Proxy-State += &Class[0]
80 }
81
82 if (&Proxy-State[0] != 0x01020304) {
83 update reply {
84 Filter-Id := "fail 3a"
85 }
86 }
87
88 # Must be the same as above
89 if (&Proxy-State[1]) {
90 update reply {
91 Filter-Id += "fail 3b"
92 }
93 }
94
95 # Remove all the Proxy-State attributes
96 update request {
97 Proxy-State !* ANY
98 }
99
100 #
101 # Copy the second instance of class
102 #
103 update request {
104 Proxy-State += &Class[1]
105 }
106
107 if (&Proxy-State[0] != 0x05060708) {
108 update reply {
109 Filter-Id := "fail 4a"
110 }
111 }
112
113 # Must be the same as above
114 if (&Proxy-State[1]) {
115 update reply {
116 Filter-Id += "fail 4b"
117 }
118 }