Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1516)

Side by Side Diff: components/tracing/test/proto_zero_generation_unittest.cc

Issue 2217703002: Tracing V2: Field number constants for protobuf plugin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove template Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "components/tracing/test/example_proto/test_messages.pbzero.h" 5 #include "components/tracing/test/example_proto/test_messages.pbzero.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 namespace tracing { 8 namespace tracing {
9 namespace proto { 9 namespace proto {
10 10
11 using foo::bar::CamelCaseFields;
12
11 TEST(ProtoZeroTest, Simple) { 13 TEST(ProtoZeroTest, Simple) {
12 // TODO(kraynov) Put tests in the next CL (crbug.com/608721). 14 // TODO(kraynov) Put tests in the next CL (crbug.com/608721).
13 } 15 }
14 16
17 TEST(ProtoZeroTest, FieldNumbers) {
18 // Tests camel case conversion as well.
19 EXPECT_EQ(1, CamelCaseFields::kFooBarBazFieldNumber);
20 EXPECT_EQ(2, CamelCaseFields::kBarBazFieldNumber);
21 EXPECT_EQ(3, CamelCaseFields::kMooMooFieldNumber);
22 EXPECT_EQ(4, CamelCaseFields::kURLEncoderFieldNumber);
23 EXPECT_EQ(5, CamelCaseFields::kXMapFieldNumber);
24 EXPECT_EQ(6, CamelCaseFields::kUrLENcoDerFieldNumber);
25 EXPECT_EQ(7, CamelCaseFields::kBigBangFieldNumber);
26 EXPECT_EQ(8, CamelCaseFields::kU2FieldNumber);
27 EXPECT_EQ(9, CamelCaseFields::kBangBigFieldNumber);
28 }
29
15 } // namespace proto 30 } // namespace proto
16 } // namespace tracing 31 } // namespace tracing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698