Ejemplo n.º 1
0
TEST_F(PropertyTest, copy) {
  {
    bt_uuid_t uuids[] = {
      {{
         0x00, 0x11, 0x22, 0x33,
         0x44, 0x55, 0x66, 0x77,
         0x88, 0x99, 0xaa, 0xbb,
         0xcc, 0xdd, 0xee, 0xff,
       }},
      {{
         0xf0, 0xe1, 0xd2, 0xc3,
         0xf4, 0xe5, 0xd6, 0xc7,
         0xf8, 0xe9, 0xda, 0xcb,
         0xfc, 0xed, 0xde, 0xcf,
       }},
    };

    bt_property_t *property0 = property_new_uuids(uuids, sizeof(bt_uuid_t)/sizeof(uuids));

    bt_property_t property1;
    property_copy(&property1, property0);
    EXPECT_TRUE(property_equals(property0, &property1));

    property_free(property0);
  }
}
Ejemplo n.º 2
0
static Box* propertyDeleter(Box* self, Box* obj) {
    RELEASE_ASSERT(isSubclass(self->cls, property_cls), "");
    BoxedProperty* prop = static_cast<BoxedProperty*>(self);
    return property_copy(prop, NULL, NULL, obj);
}