| 101 | } |
| 102 | |
| 103 | TEST(FlightTypes, Action) { |
| 104 | std::vector<Action> values = { |
| 105 | {"type", Buffer::FromString("")}, |
| 106 | {"type", Buffer::FromString("foo")}, |
| 107 | {"type", Buffer::FromString("bar")}, |
| 108 | }; |
| 109 | std::vector<std::string> reprs = { |
| 110 | "<Action type='type' body=(0 bytes)>", |
| 111 | "<Action type='type' body=(3 bytes)>", |
| 112 | "<Action type='type' body=(3 bytes)>", |
| 113 | }; |
| 114 | |
| 115 | ASSERT_NO_FATAL_FAILURE(TestRoundtrip<pb::Action>(values, reprs)); |
| 116 | |
| 117 | // This doesn't roundtrip since we don't differentiate between no |
| 118 | // body and empty body on the wire |
| 119 | Action action{"", nullptr}; |
| 120 | ASSERT_EQ("<Action type='' body=(nullptr)>", action.ToString()); |
| 121 | ASSERT_NE(values[0], action); |
| 122 | ASSERT_EQ(action, action); |
| 123 | } |
| 124 | |
| 125 | TEST(FlightTypes, ActionType) { |
| 126 | std::vector<ActionType> values = { |
nothing calls this directly
no test coverage detected