Browse Source

express: explicitly declare defaulted Datagram copy/move ctor/assign

Fixes #329
rdb 7 years ago
parent
commit
8d84c58d73
2 changed files with 7 additions and 3 deletions
  1. 5 1
      panda/src/express/datagram.h
  2. 2 2
      tests/putil/test_datagram.py

+ 5 - 1
panda/src/express/datagram.h

@@ -40,9 +40,13 @@ PUBLISHED:
   INLINE Datagram();
   INLINE Datagram(const void *data, size_t size);
   INLINE explicit Datagram(vector_uchar data);
-
+  Datagram(const Datagram &copy) = default;
+  Datagram(Datagram &&from) noexcept = default;
   virtual ~Datagram();
 
+  Datagram &operator = (const Datagram &copy) = default;
+  Datagram &operator = (Datagram &&from) noexcept = default;
+
   virtual void clear();
   void dump_hex(ostream &out, unsigned int indent=0) const;
 

+ 2 - 2
tests/putil/test_datagram.py

@@ -96,8 +96,8 @@ def test_iterator(datagram_small):
     dgi = core.DatagramIterator(dg)
     verify(dgi)
 
+
 # This tests the copy constructor:
[email protected]
 def test_copy(datagram_small):
     dg, verify = datagram_small
 
@@ -105,7 +105,7 @@ def test_copy(datagram_small):
     dgi = core.DatagramIterator(dg2)
     verify(dgi)
 
-@pytest.mark.xfail
+
 def test_assign(datagram_small):
     dg, verify = datagram_small