|
8 | 8 |
|
9 | 9 | #include <catch.hpp>
|
10 | 10 |
|
| 11 | +#include <memory> |
| 12 | + |
11 | 13 | #include <util/CBORTestUtil.h>
|
12 | 14 | #include <ArduinoCloudThing.h>
|
13 | 15 | #include "types/CloudWrapperBool.h"
|
@@ -483,15 +485,15 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
|
483 | 485 | String str_test;
|
484 | 486 | str_test = "str_test";
|
485 | 487 |
|
486 |
| - ArduinoCloudProperty *i = new CloudWrapperInt(int_test); |
487 |
| - ArduinoCloudProperty *b = new CloudWrapperBool(bool_test); |
488 |
| - ArduinoCloudProperty *f = new CloudWrapperFloat(float_test); |
489 |
| - ArduinoCloudProperty *s = new CloudWrapperString(str_test); |
| 488 | + std::unique_ptr<ArduinoCloudProperty> i(new CloudWrapperInt(int_test)); |
| 489 | + std::unique_ptr<ArduinoCloudProperty> b(new CloudWrapperBool(bool_test)); |
| 490 | + std::unique_ptr<ArduinoCloudProperty> f(new CloudWrapperFloat(float_test)); |
| 491 | + std::unique_ptr<ArduinoCloudProperty> s(new CloudWrapperString(str_test)); |
490 | 492 |
|
491 |
| - thing.addPropertyReal(*b, "bool_test", Permission::ReadWrite).onSync(CLOUD_WINS); |
492 |
| - thing.addPropertyReal(*i, "int_test", Permission::ReadWrite).onSync(CLOUD_WINS); |
| 493 | + thing.addPropertyReal(*b, "bool_test", Permission::ReadWrite).onSync(CLOUD_WINS); |
| 494 | + thing.addPropertyReal(*i, "int_test", Permission::ReadWrite).onSync(CLOUD_WINS); |
493 | 495 | thing.addPropertyReal(*f, "float_test", Permission::ReadWrite).onSync(CLOUD_WINS);
|
494 |
| - thing.addPropertyReal(*s, "str_test", Permission::ReadWrite).onSync(CLOUD_WINS); |
| 496 | + thing.addPropertyReal(*s, "str_test", Permission::ReadWrite).onSync(CLOUD_WINS); |
495 | 497 |
|
496 | 498 | thing.updateTimestampOnLocallyChangedProperties();
|
497 | 499 |
|
|
0 commit comments