OLD | NEW |
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
| 5 #include <string> |
5 #include <gtest/gtest.h> | 6 #include <gtest/gtest.h> |
6 #include "update_engine/action.h" | 7 #include "update_engine/action.h" |
7 #include "update_engine/action_pipe.h" | 8 #include "update_engine/action_pipe.h" |
8 | 9 |
| 10 using std::string; |
| 11 |
9 namespace chromeos_update_engine { | 12 namespace chromeos_update_engine { |
10 | 13 |
11 using chromeos_update_engine::ActionPipe; | 14 using chromeos_update_engine::ActionPipe; |
12 | 15 |
13 class ActionPipeTestAction; | 16 class ActionPipeTestAction; |
14 | 17 |
15 template<> | 18 template<> |
16 class ActionTraits<ActionPipeTestAction> { | 19 class ActionTraits<ActionPipeTestAction> { |
17 public: | 20 public: |
18 typedef string OutputObjectType; | 21 typedef string OutputObjectType; |
(...skipping 15 matching lines...) Expand all Loading... |
34 // This test creates two simple Actions and sends a message via an ActionPipe | 37 // This test creates two simple Actions and sends a message via an ActionPipe |
35 // from one to the other. | 38 // from one to the other. |
36 TEST(ActionPipeTest, SimpleTest) { | 39 TEST(ActionPipeTest, SimpleTest) { |
37 ActionPipeTestAction a, b; | 40 ActionPipeTestAction a, b; |
38 BondActions(&a, &b); | 41 BondActions(&a, &b); |
39 a.out_pipe()->set_contents("foo"); | 42 a.out_pipe()->set_contents("foo"); |
40 EXPECT_EQ("foo", b.in_pipe()->contents()); | 43 EXPECT_EQ("foo", b.in_pipe()->contents()); |
41 } | 44 } |
42 | 45 |
43 } // namespace chromeos_update_engine | 46 } // namespace chromeos_update_engine |
OLD | NEW |