• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3
2#  Copyright 2016 Google Inc. All Rights Reserved.
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
16from absl.testing import parameterized
17from fruit_test_common import *
18
19COMMON_DEFINITIONS = '''
20    '''
21
22FRUIT_PUBLIC_HEADERS = [
23    "component.h",
24    "fruit.h",
25    "fruit_forward_decls.h",
26    "injector.h",
27    "macro.h",
28    "normalized_component.h",
29    "provider.h",
30]
31
32class TestHeaders(parameterized.TestCase):
33    @parameterized.parameters(FRUIT_PUBLIC_HEADERS)
34    def test_header_self_contained(self, HeaderFile):
35        source = '''
36            #include <fruit/HeaderFile>
37            '''
38        expect_success(
39            COMMON_DEFINITIONS,
40            source,
41            locals())
42
43if __name__ == '__main__':
44    absltest.main()
45