test without the fixture
This commit is contained in:
parent
34d74375cc
commit
2d2ef07de7
|
@ -23,27 +23,17 @@
|
|||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <responder.h>
|
||||
|
||||
class RDMdataTest
|
||||
: public ::testing::Test
|
||||
{
|
||||
protected:
|
||||
RDMdataTest()
|
||||
TEST(RDM, device_info)
|
||||
{
|
||||
RDM::Responder responder(RDM::UID(0x12345678, 0x1234));
|
||||
std::vector<uint8_t> rdm_data;
|
||||
|
||||
responder.deviceModelID = 0x4242;
|
||||
responder.deviceProductCategory = RDM::PRODUCT_CATEGORY_TEST;
|
||||
sender_token = responder.setSender([this](const std::vector<uint8_t> &r){rdm_data = r;});
|
||||
}
|
||||
RDM::Responder responder = RDM::Responder(RDM::UID(0x12345678, 0x1234));
|
||||
std::vector<uint8_t> rdm_data;
|
||||
std::shared_ptr<void> sender_token;
|
||||
};
|
||||
auto token = responder.setSender([&rdm_data](const std::vector<uint8_t> &r){rdm_data = r;});
|
||||
|
||||
|
||||
TEST_F(RDMdataTest, device_info) {
|
||||
rdm_data.clear();
|
||||
rdm_data.push_back(RDM::SC_RDM); // START code
|
||||
rdm_data.push_back(RDM::SC_SUB_MESSAGE); // sub-START code
|
||||
rdm_data.push_back(24); // message length
|
||||
|
|
|
@ -23,15 +23,12 @@
|
|||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <node.h>
|
||||
|
||||
#include "node.h"
|
||||
|
||||
class sACNdataTest
|
||||
: public ::testing::Test
|
||||
{
|
||||
protected:
|
||||
sACNdataTest()
|
||||
TEST(sACN, stream_in)
|
||||
{
|
||||
sACN::Node node;
|
||||
uint8_t e131_data[638] = {0}; //!< Table 4-1: E1.31 Data Packet
|
||||
// Root Layer (See Section 5)
|
||||
// Preamble Size
|
||||
e131_data[1] = 0x10;
|
||||
|
@ -79,15 +76,7 @@ class sACNdataTest
|
|||
// Property value count
|
||||
e131_data[123] = 0x02;
|
||||
e131_data[124] = 0x01;
|
||||
// Property values
|
||||
}
|
||||
|
||||
sACN::Node node;
|
||||
uint8_t e131_data[638] = {0}; //!< Table 4-1: E1.31 Data Packet
|
||||
};
|
||||
|
||||
|
||||
TEST_F(sACNdataTest, stream_in) {
|
||||
// random CID
|
||||
auto cid = UUID::uuid();
|
||||
cid.uuid4();
|
||||
|
|
Loading…
Reference in New Issue