Chromium Code Reviews| Index: cc/proto/gpu_conversions_unittest.cc |
| diff --git a/cc/proto/gpu_conversions_unittest.cc b/cc/proto/gpu_conversions_unittest.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..935ef8554d115d91d77fc06e4d4a287f8b045d16 |
| --- /dev/null |
| +++ b/cc/proto/gpu_conversions_unittest.cc |
| @@ -0,0 +1,27 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "cc/proto/gpu_conversions.h" |
| + |
| +#include "cc/proto/memory_allocation.pb.h" |
| +#include "gpu/command_buffer/common/gpu_memory_allocation.h" |
| +#include "testing/gtest/include/gtest/gtest.h" |
| + |
| +namespace cc { |
| +namespace { |
| + |
| +TEST(GpuProtoConversionTest, |
| + SerializeDeserializeMemoryAllocationPriorityCutoff) { |
| + for (size_t i = 0; i < gpu::MemoryAllocation::PriorityCutoff::CUTOFF_LAST; |
| + i++) { |
|
vmpstr
2015/12/01 18:59:53
++i
nyquist
2015/12/01 22:36:47
Done.
|
| + gpu::MemoryAllocation::PriorityCutoff priority_cutoff = |
| + static_cast<gpu::MemoryAllocation::PriorityCutoff>(i); |
| + EXPECT_EQ(priority_cutoff, |
| + MemoryAllocationPriorityCutoffFromProto( |
| + MemoryAllocationPriorityCutoffToProto(priority_cutoff))); |
| + } |
| +} |
| + |
| +} // namespace |
| +} // namespace cc |