| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
| 3 // http://code.google.com/p/protobuf/ | 3 // https://developers.google.com/protocol-buffers/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| 11 // * Redistributions in binary form must reproduce the above | 11 // * Redistributions in binary form must reproduce the above |
| 12 // copyright notice, this list of conditions and the following disclaimer | 12 // copyright notice, this list of conditions and the following disclaimer |
| 13 // in the documentation and/or other materials provided with the | 13 // in the documentation and/or other materials provided with the |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 class TestUtilLite { | 46 class TestUtilLite { |
| 47 public: | 47 public: |
| 48 // Set every field in the message to a unique value. | 48 // Set every field in the message to a unique value. |
| 49 static void SetAllFields(unittest::TestAllTypesLite* message); | 49 static void SetAllFields(unittest::TestAllTypesLite* message); |
| 50 static void SetAllExtensions(unittest::TestAllExtensionsLite* message); | 50 static void SetAllExtensions(unittest::TestAllExtensionsLite* message); |
| 51 static void SetPackedFields(unittest::TestPackedTypesLite* message); | 51 static void SetPackedFields(unittest::TestPackedTypesLite* message); |
| 52 static void SetPackedExtensions(unittest::TestPackedExtensionsLite* message); | 52 static void SetPackedExtensions(unittest::TestPackedExtensionsLite* message); |
| 53 | 53 |
| 54 // Use the repeated versions of the set_*() accessors to modify all the | 54 // Use the repeated versions of the set_*() accessors to modify all the |
| 55 // repeated fields of the messsage (which should already have been | 55 // repeated fields of the message (which should already have been |
| 56 // initialized with Set*Fields()). Set*Fields() itself only tests | 56 // initialized with Set*Fields()). Set*Fields() itself only tests |
| 57 // the add_*() accessors. | 57 // the add_*() accessors. |
| 58 static void ModifyRepeatedFields(unittest::TestAllTypesLite* message); | 58 static void ModifyRepeatedFields(unittest::TestAllTypesLite* message); |
| 59 static void ModifyRepeatedExtensions( | 59 static void ModifyRepeatedExtensions( |
| 60 unittest::TestAllExtensionsLite* message); | 60 unittest::TestAllExtensionsLite* message); |
| 61 static void ModifyPackedFields(unittest::TestPackedTypesLite* message); | 61 static void ModifyPackedFields(unittest::TestPackedTypesLite* message); |
| 62 static void ModifyPackedExtensions( | 62 static void ModifyPackedExtensions( |
| 63 unittest::TestPackedExtensionsLite* message); | 63 unittest::TestPackedExtensionsLite* message); |
| 64 | 64 |
| 65 // Check that all fields have the values that they should have after | 65 // Check that all fields have the values that they should have after |
| (...skipping 26 matching lines...) Expand all Loading... |
| 92 const unittest::TestPackedExtensionsLite& message); | 92 const unittest::TestPackedExtensionsLite& message); |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TestUtilLite); | 95 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TestUtilLite); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace protobuf | 98 } // namespace protobuf |
| 99 | 99 |
| 100 } // namespace google | 100 } // namespace google |
| 101 #endif // GOOGLE_PROTOBUF_TEST_UTIL_LITE_H__ | 101 #endif // GOOGLE_PROTOBUF_TEST_UTIL_LITE_H__ |
| OLD | NEW |