Add argon stream keywords
[integration/test.git] / csit / libraries / CompareStream.robot
1 *** Settings ***
2 Documentation       This Resource contains list of Keywords Set_Variable_If_At_Least*, Set_Variable_If_At_Most,
3 ...                 Run_Keyword_If_At_Least*, Run_Keyword_If_At_Most*,
4 ...                 Run_Keyword_If_More_Than*, Run_Keyword_If_Less_Than*,
5 ...                 for comparison ${ODL_STREAM} to the given ${lower_bound},
6 ...                 in order to replace ad-hoc conditional execution in suites.
7
8 Library             Collections
9 Library             String
10
11
12 *** Variables ***
13 &{Stream_dict}
14 ...                 neon=${10}
15 ...                 sodium=${11}
16 ...                 magnesium=${12}
17 ...                 aluminium=${13}
18 ...                 silicon=${14}
19 ...                 phosphorus=${15}
20 ...                 sulfur=${16}
21 ...                 chlorine=${17}
22 ...                 argon=${18}
23 ...                 master=${999}
24
25
26 *** Keywords ***
27 Set_Variable_If_At_Least
28     [Documentation]    Compare ${lower_bound} to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least ${lower_bound},
29     ...    return ${value_if_false} otherwise.
30     [Arguments]    ${lower_bound}    ${value_if_true}    ${value_if_false}
31     BuiltIn.Run_Keyword_And_Return
32     ...    BuiltIn.Set_Variable_If
33     ...    ${Stream_dict}[${ODL_STREAM}] >= ${Stream_dict}[${lower_bound}]
34     ...    ${value_if_true}
35     ...    ${value_if_false}
36
37 Set_Variable_If_At_Most
38     [Documentation]    Compare ${upper_bound} to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most ${upper_bound},
39     ...    return ${value_if_false} otherwise.
40     [Arguments]    ${upper_bound}    ${value_if_true}    ${value_if_false}
41     BuiltIn.Run_Keyword_And_Return
42     ...    BuiltIn.Set_Variable_If
43     ...    ${Stream_dict}[${ODL_STREAM}] <= ${Stream_dict}[${upper_bound}]
44     ...    ${value_if_true}
45     ...    ${value_if_false}
46
47 Set_Variable_If_At_Least_Sodium
48     [Documentation]    Compare sodium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least sodium,
49     ...    return ${value_if_false} otherwise.
50     [Arguments]    ${value_if_true}    ${value_if_false}
51     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    sodium    ${value_if_true}    ${value_if_false}
52
53 Set_Variable_If_At_Least_Magnesium
54     [Documentation]    Compare magnesium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least magnesium, return ${value_if_false} otherwise.
55     [Arguments]    ${value_if_true}    ${value_if_false}
56     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    magnesium    ${value_if_true}    ${value_if_false}
57
58 Set_Variable_If_At_Least_Aluminium
59     [Documentation]    Compare aluminium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least aluminium, return ${value_if_false} otherwise.
60     [Arguments]    ${value_if_true}    ${value_if_false}
61     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    aluminium    ${value_if_true}    ${value_if_false}
62
63 Set_Variable_If_At_Least_Silicon
64     [Documentation]    Compare silicon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least silicon, return ${value_if_false} otherwise.
65     [Arguments]    ${value_if_true}    ${value_if_false}
66     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    silicon    ${value_if_true}    ${value_if_false}
67
68 Set_Variable_If_At_Least_Phosphorus
69     [Documentation]    Compare phosphorus to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least phosphorus, return ${value_if_false} otherwise.
70     [Arguments]    ${value_if_true}    ${value_if_false}
71     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    phosphorus    ${value_if_true}    ${value_if_false}
72
73 Set_Variable_If_At_Least_Sulfur
74     [Documentation]    Compare sulfur to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least sulfur, return ${value_if_false} otherwise.
75     [Arguments]    ${value_if_true}    ${value_if_false}
76     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    sulfur    ${value_if_true}    ${value_if_false}
77
78 Set_Variable_If_At_Least_Chlorine
79     [Documentation]    Compare chlorine to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least chlorine, return ${value_if_false} otherwise.
80     [Arguments]    ${value_if_true}    ${value_if_false}
81     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    chlorine    ${value_if_true}    ${value_if_false}
82
83 Set_Variable_If_At_Least_Argon
84     [Documentation]    Compare argon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least argon, return ${value_if_false} otherwise.
85     [Arguments]    ${value_if_true}    ${value_if_false}
86     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    argon    ${value_if_true}    ${value_if_false}
87
88 Set_Variable_If_At_Most_Neon
89     [Documentation]    Compare neon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most neon,
90     ...    return ${value_if_false} otherwise.
91     [Arguments]    ${value_if_true}    ${value_if_false}
92     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    neon    ${value_if_true}    ${value_if_false}
93
94 Set_Variable_If_At_Most_Sodium
95     [Documentation]    Compare sodium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most sodium,
96     ...    return ${value_if_false} otherwise.
97     [Arguments]    ${value_if_true}    ${value_if_false}
98     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    sodium    ${value_if_true}    ${value_if_false}
99
100 Set_Variable_If_At_Most_Magnesium
101     [Documentation]    Compare magnesium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most magnesium,
102     ...    return ${value_if_false} otherwise.
103     [Arguments]    ${value_if_true}    ${value_if_false}
104     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    magnesium    ${value_if_true}    ${value_if_false}
105
106 Set_Variable_If_At_Most_Aluminium
107     [Documentation]    Compare aluminium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most aluminium,
108     ...    return ${value_if_false} otherwise.
109     [Arguments]    ${value_if_true}    ${value_if_false}
110     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    aluminium    ${value_if_true}    ${value_if_false}
111
112 Set_Variable_If_At_Most_Silicon
113     [Documentation]    Compare silicon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most silicon,
114     ...    return ${value_if_false} otherwise.
115     [Arguments]    ${value_if_true}    ${value_if_false}
116     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    silicon    ${value_if_true}    ${value_if_false}
117
118 Set_Variable_If_At_Most_Phosphorus
119     [Documentation]    Compare phosphorus to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most phosphorus,
120     ...    return ${value_if_false} otherwise.
121     [Arguments]    ${value_if_true}    ${value_if_false}
122     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    phosphorus    ${value_if_true}    ${value_if_false}
123
124 Set_Variable_If_At_Most_Sulfur
125     [Documentation]    Compare sulfur to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most sulfur,
126     ...    return ${value_if_false} otherwise.
127     [Arguments]    ${value_if_true}    ${value_if_false}
128     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    sulfur    ${value_if_true}    ${value_if_false}
129
130 Set_Variable_If_At_Most_Chlorine
131     [Documentation]    Compare chlorine to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most chlorine,
132     ...    return ${value_if_false} otherwise.
133     [Arguments]    ${value_if_true}    ${value_if_false}
134     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    chlorine    ${value_if_true}    ${value_if_false}
135
136 Set_Variable_If_At_Most_Argon
137     [Documentation]    Compare argon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most argon,
138     ...    return ${value_if_false} otherwise.
139     [Arguments]    ${value_if_true}    ${value_if_false}
140     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    argon    ${value_if_true}    ${value_if_false}
141
142 CompareStream__Convert_Input
143     [Documentation]    Splits arguments into args and kwargs is used in Run_Keyword_If_At_Least_Else and Run_Keyword_If_At_Most_Else.
144     ...    The problem is, when the string contains =, but it is not a named argument (name=value). There can be many values containing =, but
145     ...    for sure it is present in xmls. If the string starts with "<" it will be treated as it is xml and splitting for
146     ...    name and value will not be executed.
147     ...    If named argument is passed into this kw, only string data are supported e.g. name=string. Complex variables such as lists or dictionaries
148     ...    are not supported.
149     [Arguments]    @{arguments}
150     ${args}    BuiltIn.Create_List
151     ${kwargs}    BuiltIn.Create_Dictionary
152     FOR    ${arg}    IN    @{arguments}
153         ${arg}    BuiltIn.Convert_To_String    ${arg}
154         ${removed}    String.Remove_String    ${arg}    \n    ${Space}    \t
155         ...    \r
156         IF    "${removed[0]}" == "<"
157             ${splitted}    BuiltIn.Create List    ${arg}
158         ELSE
159             ${splitted}    String.Split_String    ${arg}    separator==    max_split=1
160         END
161         ${len}    BuiltIn.Get_Length    ${splitted}
162         IF    ${len}==1
163             Collections.Append_To_List    ${args}    ${splitted}[0]
164         ELSE
165             Collections.Set_To_Dictionary    ${kwargs}    @{splitted}
166         END
167     END
168     RETURN    ${args}    ${kwargs}
169
170 Run_Keyword_If_At_Least
171     [Documentation]    Compare ${lower_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is at least ${lower_bound},
172     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
173     [Arguments]    ${lower_bound}    ${kw_name}    @{varargs}    &{kwargs}
174     BuiltIn.Run_Keyword_And_Return_If
175     ...    ${Stream_dict}[${ODL_STREAM}] >= ${Stream_dict}[${lower_bound}]
176     ...    ${kw_name}
177     ...    @{varargs}
178     ...    &{kwargs}
179
180 Run_Keyword_If_At_Least_Else
181     [Documentation]    Compare ${lower_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is at least ${lower_bound},
182     ...    run keyword defined before ELSE statement otherwise run keyword defined after ELSE statement and return its value.
183     [Arguments]    ${lower_bound}    @{varargs}
184     ${position}    Collections.Get_Index_From_List    ${varargs}    \ELSE
185     IF    "${position}" == "-1"
186         BuiltIn.Fail    Missing else statement in defined expresion
187     END
188     ${varargs_if}    Collections.Get_Slice_From_List    ${varargs}    0    ${position}
189     ${varargs_else}    Collections.Get_Slice_From_List    ${varargs}    ${position+1}
190     ${args_if}    ${kwargs_if}    CompareStream__Convert_Input    @{varargs_if}
191     ${args_else}    ${kwargs_else}    CompareStream__Convert_Input    @{varargs_else}
192     IF    ${Stream_dict}[${ODL_STREAM}] >= ${Stream_dict}[${lower_bound}]
193         ${resp}    BuiltIn.Run_Keyword    @{args_if}    &{kwargs_if}
194     ELSE
195         ${resp}    BuiltIn.Run_Keyword    @{args_else}    &{kwargs_else}
196     END
197     RETURN    ${resp}
198
199 Run_Keyword_If_At_Most
200     [Documentation]    Compare ${upper_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is at most ${upper_bound},
201     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
202     [Arguments]    ${upper_bound}    ${kw_name}    @{varargs}    &{kwargs}
203     BuiltIn.Run_Keyword_And_Return_If
204     ...    ${Stream_dict}[${ODL_STREAM}] <= ${Stream_dict}[${upper_bound}]
205     ...    ${kw_name}
206     ...    @{varargs}
207     ...    &{kwargs}
208
209 Run_Keyword_If_At_Most_Else
210     [Documentation]    Compare ${upper_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is at most ${upper_bound},
211     ...    run keyword defined before ELSE statement otherwise run keyword defined after ELSE statement and return its value.
212     [Arguments]    ${upper_bound}    @{varargs}
213     ${position}    Collections.Get_Index_From_List    ${varargs}    \ELSE
214     IF    "${position}" == "-1"
215         BuiltIn.Fail    Missing else statement in defined expresion
216     END
217     ${varargs_if}    Collections.Get_Slice_From_List    ${varargs}    0    ${position}
218     ${varargs_else}    Collections.Get_Slice_From_List    ${varargs}    ${position+1}
219     ${args_if}    ${kwargs_if}    CompareStream__Convert_Input    @{varargs_if}
220     ${args_else}    ${kwargs_else}    CompareStream__Convert_Input    @{varargs_else}
221     IF    ${Stream_dict}[${ODL_STREAM}] <= ${Stream_dict}[${upper_bound}]
222         ${resp}    BuiltIn.Run_Keyword    @{args_if}    &{kwargs_if}
223     ELSE
224         ${resp}    BuiltIn.Run_Keyword    @{args_else}    &{kwargs_else}
225     END
226     RETURN    ${resp}
227
228 Run_Keyword_If_More_Than
229     [Documentation]    Compare ${lower_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is more than ${lower_bound},
230     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
231     [Arguments]    ${lower_bound}    ${kw_name}    @{varargs}    &{kwargs}
232     BuiltIn.Run_Keyword_And_Return_If
233     ...    ${Stream_dict}[${ODL_STREAM}] > ${Stream_dict}[${lower_bound}]
234     ...    ${kw_name}
235     ...    @{varargs}
236     ...    &{kwargs}
237
238 Run_Keyword_If_Equals
239     [Documentation]    Compare ${stream} to ${ODL_STREAM} and in case ${ODL_STREAM} equals ${stream},
240     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
241     [Arguments]    ${stream}    ${kw_name}    @{varargs}    &{kwargs}
242     BuiltIn.Run_Keyword_And_Return_If
243     ...    ${Stream_dict}[${ODL_STREAM}] == ${Stream_dict}[${stream}]
244     ...    ${kw_name}
245     ...    @{varargs}
246     ...    &{kwargs}
247
248 Run_Keyword_If_Equals_Else
249     [Documentation]    Compare ${stream} to ${ODL_STREAM} and in case ${ODL_STREAM} equals ${stream},
250     ...    run keyword defined before ELSE statement otherwise run keyword defined after ELSE statement and return its value.
251     [Arguments]    ${stream}    @{varargs}
252     ${position}    Collections.Get_Index_From_List    ${varargs}    \ELSE
253     IF    "${position}" == "-1"
254         BuiltIn.Fail    Missing else statement in defined expresion
255     END
256     ${varargs_if}    Collections.Get_Slice_From_List    ${varargs}    0    ${position}
257     ${varargs_else}    Collections.Get_Slice_From_List    ${varargs}    ${position+1}
258     ${args_if}    ${kwargs_if}    CompareStream__Convert_Input    @{varargs_if}
259     ${args_else}    ${kwargs_else}    CompareStream__Convert_Input    @{varargs_else}
260     IF    ${Stream_dict}[${ODL_STREAM}] == ${Stream_dict}[${stream}]
261         ${resp}    BuiltIn.Run_Keyword    @{args_if}    &{kwargs_if}
262     ELSE
263         ${resp}    BuiltIn.Run_Keyword    @{args_else}    &{kwargs_else}
264     END
265     RETURN    ${resp}
266
267 Run_Keyword_If_Less_Than
268     [Documentation]    Compare ${lower_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is less than ${lower_bound},
269     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
270     [Arguments]    ${lower_bound}    ${kw_name}    @{varargs}    &{kwargs}
271     BuiltIn.Run_Keyword_And_Return_If
272     ...    ${Stream_dict}[${ODL_STREAM}] < ${Stream_dict}[${lower_bound}]
273     ...    ${kw_name}
274     ...    @{varargs}
275     ...    &{kwargs}
276
277 Run_Keyword_If_At_Least_Sodium
278     [Documentation]    Compare sodium to ${ODL_STREAM} and in case ${ODL_STREAM} is at least sodium,
279     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
280     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
281     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    sodium    ${kw_name}    @{varargs}    &{kwargs}
282
283 Run_Keyword_If_At_Least_Magnesium
284     [Documentation]    Compare magnesium to ${ODL_STREAM} and in case ${ODL_STREAM} is at least magnesium,
285     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
286     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
287     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    magnesium    ${kw_name}    @{varargs}    &{kwargs}
288
289 Run_Keyword_If_At_Least_Aluminium
290     [Documentation]    Compare aluminium to ${ODL_STREAM} and in case ${ODL_STREAM} is at least aluminium,
291     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
292     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
293     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    aluminium    ${kw_name}    @{varargs}    &{kwargs}
294
295 Run_Keyword_If_At_Least_Silicon
296     [Documentation]    Compare silicon to ${ODL_STREAM} and in case ${ODL_STREAM} is at least silicon,
297     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
298     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
299     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    silicon    ${kw_name}    @{varargs}    &{kwargs}
300
301 Run_Keyword_If_At_Least_Phosphorus
302     [Documentation]    Compare phosphorus to ${ODL_STREAM} and in case ${ODL_STREAM} is at least phosphorus,
303     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
304     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
305     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    phosphorus    ${kw_name}    @{varargs}    &{kwargs}
306
307 Run_Keyword_If_At_Least_Sulfur
308     [Documentation]    Compare sulfur to ${ODL_STREAM} and in case ${ODL_STREAM} is at least sulfur,
309     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
310     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
311     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    sulfur    ${kw_name}    @{varargs}    &{kwargs}
312
313 Run_Keyword_If_At_Least_Chlorine
314     [Documentation]    Compare chlorine to ${ODL_STREAM} and in case ${ODL_STREAM} is at least chlorine,
315     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
316     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
317     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    chlorine    ${kw_name}    @{varargs}    &{kwargs}
318
319 Run_Keyword_If_At_Least_Argon
320     [Documentation]    Compare argon to ${ODL_STREAM} and in case ${ODL_STREAM} is at least argon,
321     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
322     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
323     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    argon    ${kw_name}    @{varargs}    &{kwargs}
324
325 Run_Keyword_If_At_Most_Neon
326     [Documentation]    Compare neon to ${ODL_STREAM} and in case ${ODL_STREAM} is at most neon,
327     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
328     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
329     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    neon    ${kw_name}    @{varargs}    &{kwargs}
330
331 Run_Keyword_If_At_Most_Sodium
332     [Documentation]    Compare sodium to ${ODL_STREAM} and in case ${ODL_STREAM} is at most sodium,
333     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
334     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
335     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    sodium    ${kw_name}    @{varargs}    &{kwargs}
336
337 Run_Keyword_If_At_Most_Magnesium
338     [Documentation]    Compare magnesium to ${ODL_STREAM} and in case ${ODL_STREAM} is at most magnesium,
339     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
340     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
341     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    magnesium    ${kw_name}    @{varargs}    &{kwargs}
342
343 Run_Keyword_If_At_Most_Aluminium
344     [Documentation]    Compare aluminium to ${ODL_STREAM} and in case ${ODL_STREAM} is at most aluminium,
345     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
346     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
347     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    aluminium    ${kw_name}    @{varargs}    &{kwargs}
348
349 Run_Keyword_If_At_Most_Silicon
350     [Documentation]    Compare silicon to ${ODL_STREAM} and in case ${ODL_STREAM} is at most silicon,
351     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
352     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
353     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    silicon    ${kw_name}    @{varargs}    &{kwargs}
354
355 Run_Keyword_If_At_Most_Phosphorus
356     [Documentation]    Compare phosphorus to ${ODL_STREAM} and in case ${ODL_STREAM} is at most phosphorus,
357     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
358     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
359     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    phosphorus    ${kw_name}    @{varargs}    &{kwargs}
360
361 Run_Keyword_If_At_Most_Sulfur
362     [Documentation]    Compare sulfur to ${ODL_STREAM} and in case ${ODL_STREAM} is at most sulfur,
363     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
364     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
365     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    sulfur    ${kw_name}    @{varargs}    &{kwargs}
366
367 Run_Keyword_If_At_Most_Chlorine
368     [Documentation]    Compare chlorine to ${ODL_STREAM} and in case ${ODL_STREAM} is at most chlorine,
369     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
370     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
371     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    chlorine    ${kw_name}    @{varargs}    &{kwargs}
372
373 Run_Keyword_If_At_Most_Argon
374     [Documentation]    Compare argon to ${ODL_STREAM} and in case ${ODL_STREAM} is at most argon,
375     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
376     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
377     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    argon    ${kw_name}    @{varargs}    &{kwargs}
378
379 Run_Keyword_If_More_Than_Neon
380     [Documentation]    Compare neon to ${ODL_STREAM} and in case ${ODL_STREAM} is more than neon,
381     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
382     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
383     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    neon    ${kw_name}    @{varargs}    &{kwargs}
384
385 Run_Keyword_If_More_Than_Sodium
386     [Documentation]    Compare sodium to ${ODL_STREAM} and in case ${ODL_STREAM} is more than sodium,
387     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
388     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
389     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    sodium    ${kw_name}    @{varargs}    &{kwargs}
390
391 Run_Keyword_If_More_Than_Magnesium
392     [Documentation]    Compare magnesium to ${ODL_STREAM} and in case ${ODL_STREAM} is more than magnesium,
393     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
394     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
395     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    magnesium    ${kw_name}    @{varargs}    &{kwargs}
396
397 Run_Keyword_If_More_Than_Aluminium
398     [Documentation]    Compare aluminium to ${ODL_STREAM} and in case ${ODL_STREAM} is more than aluminium,
399     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
400     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
401     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    aluminium    ${kw_name}    @{varargs}    &{kwargs}
402
403 Run_Keyword_If_More_Than_Silicon
404     [Documentation]    Compare silicon to ${ODL_STREAM} and in case ${ODL_STREAM} is more than silicon,
405     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
406     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
407     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    silicon    ${kw_name}    @{varargs}    &{kwargs}
408
409 Run_Keyword_If_More_Than_Phosphorus
410     [Documentation]    Compare phosphorus to ${ODL_STREAM} and in case ${ODL_STREAM} is more than phosphorus,
411     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
412     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
413     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    phosphorus    ${kw_name}    @{varargs}    &{kwargs}
414
415 Run_Keyword_If_More_Than_Sulfur
416     [Documentation]    Compare sulfur to ${ODL_STREAM} and in case ${ODL_STREAM} is more than sulfur,
417     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
418     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
419     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    sulfur    ${kw_name}    @{varargs}    &{kwargs}
420
421 Run_Keyword_If_More_Than_Chlorine
422     [Documentation]    Compare chlorine to ${ODL_STREAM} and in case ${ODL_STREAM} is more than chlorine,
423     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
424     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
425     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    chlorine    ${kw_name}    @{varargs}    &{kwargs}
426
427 Run_Keyword_If_More_Than_Argon
428     [Documentation]    Compare argon to ${ODL_STREAM} and in case ${ODL_STREAM} is more than argon,
429     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
430     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
431     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    argon    ${kw_name}    @{varargs}    &{kwargs}
432
433 Run_Keyword_If_Less_Than_Sodium
434     [Documentation]    Compare sodium to ${ODL_STREAM} and in case ${ODL_STREAM} is less than sodium,
435     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
436     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
437     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    sodium    ${kw_name}    @{varargs}    &{kwargs}
438
439 Run_Keyword_If_Less_Than_Magnesium
440     [Documentation]    Compare magnesium to ${ODL_STREAM} and in case ${ODL_STREAM} is less than magnesium,
441     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
442     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
443     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    magnesium    ${kw_name}    @{varargs}    &{kwargs}
444
445 Run_Keyword_If_Less_Than_Aluminium
446     [Documentation]    Compare aluminium to ${ODL_STREAM} and in case ${ODL_STREAM} is less than aluminium,
447     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
448     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
449     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    aluminium    ${kw_name}    @{varargs}    &{kwargs}
450
451 Run_Keyword_If_Less_Than_Silicon
452     [Documentation]    Compare silicon to ${ODL_STREAM} and in case ${ODL_STREAM} is less than silicon,
453     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
454     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
455     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    silicon    ${kw_name}    @{varargs}    &{kwargs}
456
457 Run_Keyword_If_Less_Than_Phosphorus
458     [Documentation]    Compare phosphorus to ${ODL_STREAM} and in case ${ODL_STREAM} is less than phosphorus,
459     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
460     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
461     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    phosphorus    ${kw_name}    @{varargs}    &{kwargs}
462
463 Run_Keyword_If_Less_Than_Sulfur
464     [Documentation]    Compare sulfur to ${ODL_STREAM} and in case ${ODL_STREAM} is less than sulfur,
465     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
466     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
467     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    sulfur    ${kw_name}    @{varargs}    &{kwargs}
468
469 Run_Keyword_If_Less_Than_Chlorine
470     [Documentation]    Compare chlorine to ${ODL_STREAM} and in case ${ODL_STREAM} is less than chlorine,
471     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
472     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
473     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    chlorine    ${kw_name}    @{varargs}    &{kwargs}
474
475 Run_Keyword_If_Less_Than_Argon
476     [Documentation]    Compare argon to ${ODL_STREAM} and in case ${ODL_STREAM} is less than argon,
477     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
478     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
479     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    argon    ${kw_name}    @{varargs}    &{kwargs}