test_create.cpp
Go to the documentation of this file.
1 
31 #include "create/create.h"
32 #include "create/types.h"
33 
34 #include "gtest/gtest.h"
35 
36 TEST(CreateTest, ConstructorSingleParam)
37 {
38  create::Create create_default;
39 
41 
43 
45 }
46 
47 // TEST(CreateTest, ConstructorMultiParam)
48 // {
49 // TODO(jacobperron): Document exception thrown and consider defining custom exception
50 // create::Create create(std::string("/dev/ttyUSB0"), 11520);
51 // }
52 
53 TEST(CreateTest, Connected)
54 {
56  // Nothing to be connected to
57  EXPECT_FALSE(create.connected());
58 }
59 
60 TEST(CreateTest, Disconnect)
61 {
63  // Even though not connected, this should not crash
64  create.disconnect();
65 }
static RobotModel CREATE_1
Compatible with Create 1 or Roomba 500 series.
Definition: types.h:68
Definition: create.h:48
bool connected() const
Check if serial connection is active.
Definition: create.h:148
TEST(CreateTest, ConstructorSingleParam)
Definition: test_create.cpp:36
static RobotModel CREATE_2
Compatible with Create 2 or Roomba 600 series and greater.
Definition: types.h:73
void disconnect()
Disconnect from serial.
Definition: create.cpp:314
static RobotModel ROOMBA_400
Compatible with Roomba 400 series and earlier.
Definition: types.h:63


libcreate
Author(s): Jacob Perron
autogenerated on Sat May 8 2021 03:02:37