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 3 // found in the LICENSE file. 4 5 namespace blink { 6 7 enum EnumInNamespace { 8 // These should be renamed to kConstantCase. 9 kNamedWrong, 10 kNamedWrong2, 11 // This shouldn't exist but if it does renaming them will help us find them. 12 kNamedWrong3, 13 }; 14 15 class T { 16 public: 17 enum EnumInClass { 18 // These should be renamed to kConstantCase. 19 kClassNamedWrong, 20 kClassNamedWrong22, 21 // This shouldn't exist but if it does renaming them will help us find them. 22 kClassNamed33Wrong, 23 }; 24 25 enum class EnumClassInClass { 26 // These should be renamed to kConstantCase. 27 kEnumClassNamedWrong, 28 kEnumClassNamedWrong22, 29 // This shouldn't exist but if it does renaming them will help us find them. 30 kEnumClassNamed33Wrong, 31 }; 32 }; 33 34 // Is SHOUT_CAPS, so the naming shouldn't change. 35 enum AlreadyShouty { 36 ENABLE_DIRECTZ3000_SUPPORT_FOR_HL3E1, 37 }; 38 39 } // namespace blink 40 41 enum EnumOutsideNamespace { 42 // These should not be renamed. 43 OutNamedWrong, 44 outNamedWrong2, 45 kOutNamedWrong3, 46 }; 47 48 void F() { 49 // These should be renamed to kConstantCase. 50 blink::EnumInNamespace e1 = blink::kNamedWrong; 51 blink::EnumInNamespace e2 = blink::kNamedWrong2; 52 blink::T::EnumInClass e3 = blink::T::kClassNamedWrong; 53 blink::T::EnumInClass e4 = blink::T::kClassNamedWrong22; 54 blink::T::EnumClassInClass e5 = 55 blink::T::EnumClassInClass::kEnumClassNamedWrong; 56 blink::T::EnumClassInClass e6 = 57 blink::T::EnumClassInClass::kEnumClassNamedWrong22; 58 // These should not be renamed. 59 EnumOutsideNamespace e7 = OutNamedWrong; 60 EnumOutsideNamespace e8 = outNamedWrong2; 61 } 62 63 int G() { 64 using blink::kNamedWrong; 65 using blink::kNamedWrong2; 66 using blink::kNamedWrong3; 67 return kNamedWrong | kNamedWrong2 | kNamedWrong3; 68 } 69