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 #include <boost/shared_ptr.hpp>
37 
38 TEST(CreateTest, ConstructorSingleParam)
39 {
40  create::Create create_default;
41 
43 
45 
47 }
48 
49 // TEST(CreateTest, ConstructorMultiParam)
50 // {
51 // TODO(jacobperron): Document exception thrown and consider defining custom exception
52 // create::Create create(std::string("/dev/ttyUSB0"), 11520);
53 // }
54 
55 TEST(CreateTest, Connected)
56 {
58  // Nothing to be connected to
59  EXPECT_FALSE(create.connected());
60 }
61 
62 TEST(CreateTest, Disconnect)
63 {
65  // Even though not connected, this should not crash
66  create.disconnect();
67 }
static RobotModel CREATE_1
Compatible with Create 1 or Roomba 500 series.
Definition: types.h:68
Definition: create.h:46
bool connected() const
Check if serial connection is active.
Definition: create.h:140
TEST(CreateTest, ConstructorSingleParam)
Definition: test_create.cpp:38
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:293
static RobotModel ROOMBA_400
Compatible with Roomba 400 series and earlier.
Definition: types.h:63


libcreate
Author(s): Jacob Perron
autogenerated on Sat Jun 8 2019 17:58:17