@@ -265,3 +265,81 @@ tests:
265
265
attribute : " char_string"
266
266
arguments :
267
267
value : " "
268
+
269
+ # Tests for hasValue attribute
270
+
271
+ - label : " Read attribute NULLABLE_INT8U Default Value"
272
+ command : " readAttribute"
273
+ attribute : " nullable_int8u"
274
+ response :
275
+ value : 0
276
+
277
+ - label : " Write attribute NULLABLE_INT8U with a value"
278
+ command : " writeAttribute"
279
+ attribute : " nullable_int8u"
280
+ arguments :
281
+ value : 0
282
+
283
+ - label : " Read attribute NULLABLE_INT8U with a value"
284
+ command : " readAttribute"
285
+ attribute : " nullable_int8u"
286
+ response :
287
+ constraints :
288
+ hasValue : true
289
+
290
+ - label : " Write attribute NULLABLE_INT8U without a value"
291
+ command : " writeAttribute"
292
+ attribute : " nullable_int8u"
293
+ arguments :
294
+ value : null
295
+
296
+ - label : " Read attribute NULLABLE_INT8U with a value"
297
+ command : " readAttribute"
298
+ attribute : " nullable_int8u"
299
+ response :
300
+ constraints :
301
+ hasValue : false
302
+
303
+ - label : " Write attribute NULLABLE_INT8U back to Default Value"
304
+ command : " writeAttribute"
305
+ attribute : " nullable_int8u"
306
+ arguments :
307
+ value : 0
308
+
309
+ - label : " Read attribute NULLABLE_OCTET_STRING Default Value"
310
+ command : " readAttribute"
311
+ attribute : " nullable_octet_string"
312
+ response :
313
+ value : " "
314
+
315
+ - label : " Write attribute NULLABLE_OCTET_STRING"
316
+ command : " writeAttribute"
317
+ attribute : " nullable_octet_string"
318
+ arguments :
319
+ value : " TestValue"
320
+
321
+ - label : " Read attribute NULLABLE_OCTET_STRING"
322
+ command : " readAttribute"
323
+ attribute : " nullable_octet_string"
324
+ response :
325
+ constraints :
326
+ hasValue : true
327
+
328
+ - label : " Write attribute NULLABLE_OCTET_STRING"
329
+ command : " writeAttribute"
330
+ attribute : " nullable_octet_string"
331
+ arguments :
332
+ value : null
333
+
334
+ - label : " Read attribute NULLABLE_OCTET_STRING"
335
+ command : " readAttribute"
336
+ attribute : " nullable_octet_string"
337
+ response :
338
+ constraints :
339
+ hasValue : false
340
+
341
+ - label : " Write attribute NULLABLE_OCTET_STRING back to Default Value"
342
+ command : " writeAttribute"
343
+ attribute : " nullable_octet_string"
344
+ arguments :
345
+ value : " "
0 commit comments