@@ -37,7 +37,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
3737 WHEN (" A boolean property is changed via CBOR message" )
3838 {
3939 PropertyContainer property_container;
40-
40+
4141 CloudBool test = true ;
4242 addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
4343
@@ -55,7 +55,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
5555 {
5656 /* An integer identifier has been encoded instead of the name of the property in order to have a shorter payload*/
5757 PropertyContainer property_container;
58-
58+
5959 CloudBool test = true ;
6060 /* The property is added with identifier 1 that will be used instead of the string "test" as property identifier*/
6161 addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite, 1 );
@@ -73,8 +73,8 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
7373 WHEN (" A positive int property is changed via CBOR message" )
7474 {
7575 PropertyContainer property_container;
76-
77- CloudInt test = 0 ;
76+
77+ CloudInt< int > test = 0 ;
7878 addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
7979
8080 /* [{0: "test", 2: 7}] = 81 A2 00 64 74 65 73 74 02 07 */
@@ -88,8 +88,8 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
8888 WHEN (" A negative int property is changed via CBOR message" )
8989 {
9090 PropertyContainer property_container;
91-
92- CloudInt test = 0 ;
91+
92+ CloudInt< int > test = 0 ;
9393 addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
9494
9595 /* [{0: "test", 2: -7}] = 81 A2 00 64 74 65 73 74 02 26 */
@@ -105,7 +105,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
105105 WHEN (" A float property is changed via CBOR message" )
106106 {
107107 PropertyContainer property_container;
108-
108+
109109 CloudFloat test = 0 .0f ;
110110 addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
111111
@@ -122,7 +122,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
122122 WHEN (" A String property is changed via CBOR message" )
123123 {
124124 PropertyContainer property_container;
125-
125+
126126 CloudString str_test;
127127 str_test = " test" ;
128128 addPropertyToContainer (property_container, str_test, " test" , Permission::ReadWrite);
@@ -139,7 +139,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
139139 WHEN (" A Location property is changed via CBOR message" )
140140 {
141141 PropertyContainer property_container;
142-
142+
143143 CloudLocation location_test = CloudLocation (0 , 1 );
144144 addPropertyToContainer (property_container, location_test, " test" , Permission::ReadWrite);
145145
@@ -157,7 +157,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
157157 WHEN (" A Color property is changed via CBOR message" )
158158 {
159159 PropertyContainer property_container;
160-
160+
161161 CloudColor color_test = CloudColor (0.0 , 0.0 , 0.0 );
162162
163163 addPropertyToContainer (property_container, color_test, " test" , Permission::ReadWrite);
@@ -181,7 +181,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
181181 {
182182 /* An integer identifier has been encoded instead of the name of the property in order to have a shorter payload*/
183183 PropertyContainer property_container;
184-
184+
185185 CloudColor color_test = CloudColor (0.0 , 0.0 , 0.0 );
186186
187187 /* The property is added with identifier 1 that will be used instead of the string "test" as property identifier*/
@@ -205,7 +205,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
205205 WHEN (" A ColoredLight property is changed via CBOR message" )
206206 {
207207 PropertyContainer property_container;
208-
208+
209209 CloudColoredLight color_test = CloudColoredLight (false , 0.0 , 0.0 , 0.0 );
210210
211211 addPropertyToContainer (property_container, color_test, " test" , Permission::ReadWrite);
@@ -229,7 +229,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
229229 WHEN (" A Television property is changed via CBOR message" )
230230 {
231231 PropertyContainer property_container;
232-
232+
233233 CloudTelevision tv_test = CloudTelevision (false , 0 , false , PlaybackCommands::Stop, InputValue::AUX1, 0 );
234234
235235 addPropertyToContainer (property_container, tv_test, " test" , Permission::ReadWrite);
@@ -255,7 +255,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
255255 WHEN (" A DimmedLight property is changed via CBOR message" )
256256 {
257257 PropertyContainer property_container;
258-
258+
259259 CloudDimmedLight light_test = CloudDimmedLight (false , 0.0 );
260260
261261 addPropertyToContainer (property_container, light_test, " test" , Permission::ReadWrite);
@@ -277,7 +277,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
277277 WHEN (" A Light property is changed via CBOR message" )
278278 {
279279 PropertyContainer property_container;
280-
280+
281281 CloudLight light_test;
282282 light_test = false ;
283283
@@ -295,7 +295,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
295295 WHEN (" A ContactSensor property is changed via CBOR message" )
296296 {
297297 PropertyContainer property_container;
298-
298+
299299 CloudContactSensor contact_test;
300300 contact_test = false ;
301301
@@ -313,7 +313,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
313313 WHEN (" A MotionSensor property is changed via CBOR message" )
314314 {
315315 PropertyContainer property_container;
316-
316+
317317 CloudMotionSensor motion_test;
318318 motion_test = false ;
319319
@@ -331,7 +331,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
331331 WHEN (" A SmartPlug property is changed via CBOR message" )
332332 {
333333 PropertyContainer property_container;
334-
334+
335335 CloudSmartPlug plug_test;
336336 plug_test = false ;
337337
@@ -349,7 +349,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
349349 WHEN (" A Switch property is changed via CBOR message" )
350350 {
351351 PropertyContainer property_container;
352-
352+
353353 CloudSwitch switch_test;
354354 switch_test = false ;
355355
@@ -367,7 +367,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
367367 WHEN (" A Temperature property is changed via CBOR message" )
368368 {
369369 PropertyContainer property_container;
370-
370+
371371 CloudTemperatureSensor test;
372372 test = 0 .0f ;
373373 addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
@@ -414,8 +414,8 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
414414 CBORDecoder::decode (property_container, payload, sizeof (payload) / sizeof (uint8_t ));
415415
416416 Schedule schedule_compare = Schedule (1633305600 , 1633651200 , 600 , 1140850708 );
417- Schedule value_schedule_test = schedule_test.getValue ();
418-
417+ Schedule value_schedule_test = schedule_test.getValue ();
418+
419419 bool verify = (value_schedule_test == schedule_compare);
420420 REQUIRE (verify);
421421 REQUIRE (value_schedule_test.frm == schedule_compare.frm );
@@ -431,11 +431,11 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
431431 WHEN (" Multiple properties of different type are changed via CBOR message" )
432432 {
433433 PropertyContainer property_container;
434-
435- CloudBool bool_test = false ;
436- CloudInt int_test = 1 ;
437- CloudFloat float_test = 2 .0f ;
438- CloudString str_test;
434+
435+ CloudBool bool_test = false ;
436+ CloudInt< int > int_test = 1 ;
437+ CloudFloat float_test = 2 .0f ;
438+ CloudString str_test;
439439 str_test = (" str_test" );
440440
441441 addPropertyToContainer (property_container, bool_test, " bool_test" , Permission::ReadWrite);
@@ -460,11 +460,11 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
460460 WHEN (" Multiple properties of different type are synchronized via CBOR message. FORCE_CLOUD_SYNC is passed as synchronization function and as a consequence values contained in the incoming message are stored in the properties" )
461461 {
462462 PropertyContainer property_container;
463-
464- CloudBool bool_test = false ;
465- CloudInt int_test = 1 ;
466- CloudFloat float_test = 2 .0f ;
467- CloudString str_test;
463+
464+ CloudBool bool_test = false ;
465+ CloudInt< int > int_test = 1 ;
466+ CloudFloat float_test = 2 .0f ;
467+ CloudString str_test;
468468 str_test = (" str_test" );
469469
470470 addPropertyToContainer (property_container, bool_test, " bool_test" , Permission::ReadWrite).onSync (CLOUD_WINS);
@@ -489,14 +489,14 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
489489 WHEN (" Multiple primitive properties of different type are synchronized via CBOR message. FORCE_CLOUD_SYNC is passed as synchronization function and as a consequence values contained in the incoming message are stored in the properties" )
490490 {
491491 PropertyContainer property_container;
492-
492+
493493 int int_test = 1 ;
494494 bool bool_test = false ;
495495 float float_test = 2 .0f ;
496496 String str_test;
497497 str_test = " str_test" ;
498498
499- std::unique_ptr<Property> i (new CloudWrapperInt (int_test));
499+ std::unique_ptr<Property> i (new CloudWrapperInt< int > (int_test));
500500 std::unique_ptr<Property> b (new CloudWrapperBool (bool_test));
501501 std::unique_ptr<Property> f (new CloudWrapperFloat (float_test));
502502 std::unique_ptr<Property> s (new CloudWrapperString (str_test));
@@ -525,7 +525,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
525525 WHEN (" Multiple String properties are changed via CBOR message" )
526526 {
527527 PropertyContainer property_container;
528-
528+
529529 CloudString str_1 (" hello" ),
530530 str_2 (" arduino" ),
531531 str_3 (" cloud" ),
@@ -554,7 +554,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
554554 WHEN (" A payload containing a CBOR base name is parsed" )
555555 {
556556 PropertyContainer property_container;
557-
557+
558558 CloudString str = " hello" ;
559559 addPropertyToContainer (property_container, str, " test" , Permission::ReadWrite);
560560
@@ -570,8 +570,8 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
570570 WHEN (" A payload containing a CBOR base time is parsed" )
571571 {
572572 PropertyContainer property_container;
573-
574- CloudInt test = 0 ;
573+
574+ CloudInt< int > test = 0 ;
575575 addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
576576
577577 /* [{-3: 123.456, 0: "test", 2: 1}] = 81 A3 22 FB 40 5E DD 2F 1A 9F BE 77 00 64 74 65 73 74 02 01 */
@@ -586,8 +586,8 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
586586 WHEN (" A payload containing a CBOR time is parsed" )
587587 {
588588 PropertyContainer property_container;
589-
590- CloudInt test = 0 ;
589+
590+ CloudInt< int > test = 0 ;
591591 addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
592592
593593 /* [{6: 123.456, 0: "test", 2: 1}] = 81 A3 06 FB 40 5E DD 2F 1A 9F BE 77 00 64 74 65 73 74 02 01 */
@@ -602,8 +602,8 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
602602 WHEN (" A payload containing a CBOR BaseVersion is parsed" )
603603 {
604604 PropertyContainer property_container;
605-
606- CloudInt test = 0 ;
605+
606+ CloudInt< int > test = 0 ;
607607 addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
608608
609609 /* [{-1: 1, 0: "test", 2: 1}] = 81 A3 20 01 00 64 74 65 73 74 02 01 */
@@ -618,8 +618,8 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
618618 WHEN (" A payload containing a CBOR BaseName, BaseTime and Time is parsed" )
619619 {
620620 PropertyContainer property_container;
621-
622- CloudInt test = 0 ;
621+
622+ CloudInt< int > test = 0 ;
623623 addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
624624
625625 /* [{-2: "base-name", -3: 654.321, 6: 123.456, 0: "test", 2: 1}] =
@@ -636,8 +636,8 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
636636 WHEN (" A payload containing a invalid CBOR key is parsed" )
637637 {
638638 PropertyContainer property_container;
639-
640- CloudInt test = 0 ;
639+
640+ CloudInt< int > test = 0 ;
641641 addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
642642
643643 /* [{123: 123, 0: "test", 2: 1}] = 81 A3 18 7B 18 7B 00 64 74 65 73 74 02 01 */
0 commit comments