|
| 1 | +/* |
| 2 | + * Copyright 2020 Google LLC |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +/* This is a test file for merge_libraries.py tests. It contains some C and C++ |
| 18 | + * symbols that merge_libraries can rename. */ |
| 19 | + |
| 20 | +extern "C" { |
| 21 | +int test_symbol(void) { return 1; } // NOLINT |
| 22 | + |
| 23 | +int test_another_symbol(void) { return 2; } // NOLINT |
| 24 | + |
| 25 | +int test_yet_one_more_symbol(void) { return 3; } // NOLINT |
| 26 | + |
| 27 | +int global_c_symbol = 789; // NOLINT |
| 28 | + |
| 29 | +extern int not_in_this_file(); // NOLINT |
| 30 | +} |
| 31 | + |
| 32 | +namespace test_namespace { |
| 33 | + |
| 34 | +class TestClass { |
| 35 | + public: |
| 36 | + TestClass(); |
| 37 | + int TestMethod(); |
| 38 | + int TestMethodNotInThisfile(); |
| 39 | + int TestStaticMethod(); |
| 40 | + int TestStaticMethodNotInThisFile(); |
| 41 | + static int test_static_field; // NOLINT |
| 42 | +}; |
| 43 | + |
| 44 | +int global_cpp_symbol = 12345; // NOLINT |
| 45 | + |
| 46 | +int TestClass::test_static_field; |
| 47 | + |
| 48 | +TestClass::TestClass() {} |
| 49 | + |
| 50 | +int TestClass::TestMethod() { return not_in_this_file(); } |
| 51 | + |
| 52 | +int TestClass::TestStaticMethod() { return TestStaticMethodNotInThisFile(); } |
| 53 | + |
| 54 | +} // namespace test_namespace |
0 commit comments