Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium 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 // This file contains tests that are shared between different implementations of | 5 // This file contains tests that are shared between different implementations of |
| 6 // |DataPipeImpl|. | 6 // |DataPipeImpl|. |
| 7 | 7 |
| 8 #include "mojo/edk/system/data_pipe_impl.h" | 8 #include "mojo/edk/system/data_pipe_impl.h" |
| 9 | 9 |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 542 consumer_dispatcher_ = | 542 consumer_dispatcher_ = |
| 543 static_cast<DataPipeConsumerDispatcher*>(to_receive.get()); | 543 static_cast<DataPipeConsumerDispatcher*>(to_receive.get()); |
| 544 } | 544 } |
| 545 | 545 |
| 546 private: | 546 private: |
| 547 DISALLOW_COPY_AND_ASSIGN(RemoteConsumerDataPipeImplTestHelper2); | 547 DISALLOW_COPY_AND_ASSIGN(RemoteConsumerDataPipeImplTestHelper2); |
| 548 }; | 548 }; |
| 549 | 549 |
| 550 // Test case instantiation ----------------------------------------------------- | 550 // Test case instantiation ----------------------------------------------------- |
| 551 | 551 |
| 552 typedef testing::Types<LocalDataPipeImplTestHelper, | 552 using HelperTypes = testing::Types<LocalDataPipeImplTestHelper, |
|
jamesr
2015/05/22 18:16:04
woah, do i wanna look at what this is?
viettrungluu
2015/05/22 18:24:27
The short answer is no. The long answer is type-pa
| |
| 553 RemoteProducerDataPipeImplTestHelper, | 553 RemoteProducerDataPipeImplTestHelper, |
| 554 RemoteConsumerDataPipeImplTestHelper, | 554 RemoteConsumerDataPipeImplTestHelper, |
| 555 RemoteProducerDataPipeImplTestHelper2, | 555 RemoteProducerDataPipeImplTestHelper2, |
| 556 RemoteConsumerDataPipeImplTestHelper2> HelperTypes; | 556 RemoteConsumerDataPipeImplTestHelper2>; |
| 557 | 557 |
| 558 TYPED_TEST_CASE(DataPipeImplTest, HelperTypes); | 558 TYPED_TEST_CASE(DataPipeImplTest, HelperTypes); |
| 559 | 559 |
| 560 // Tests ----------------------------------------------------------------------- | 560 // Tests ----------------------------------------------------------------------- |
| 561 | 561 |
| 562 // Tests creation (and possibly also transferring) of data pipes with various | 562 // Tests creation (and possibly also transferring) of data pipes with various |
| 563 // (valid) options. | 563 // (valid) options. |
| 564 TYPED_TEST(DataPipeImplTest, CreateAndMaybeTransfer) { | 564 TYPED_TEST(DataPipeImplTest, CreateAndMaybeTransfer) { |
| 565 MojoCreateDataPipeOptions test_options[] = { | 565 MojoCreateDataPipeOptions test_options[] = { |
| 566 // Default options -- we'll initialize this below. | 566 // Default options -- we'll initialize this below. |
| (...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2390 this->ConsumerQueryData(MakeUserPointer(&num_bytes))); | 2390 this->ConsumerQueryData(MakeUserPointer(&num_bytes))); |
| 2391 EXPECT_EQ(1u * sizeof(int32_t), num_bytes); | 2391 EXPECT_EQ(1u * sizeof(int32_t), num_bytes); |
| 2392 | 2392 |
| 2393 this->ProducerClose(); | 2393 this->ProducerClose(); |
| 2394 this->ConsumerClose(); | 2394 this->ConsumerClose(); |
| 2395 } | 2395 } |
| 2396 | 2396 |
| 2397 } // namespace | 2397 } // namespace |
| 2398 } // namespace system | 2398 } // namespace system |
| 2399 } // namespace mojo | 2399 } // namespace mojo |
| OLD | NEW |