1package {
2    default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5java_test_host {
6    name: "xsdc-java-tests",
7    srcs: [
8        "src/**/*.java",
9        ":xsdc_attr_group_simple_tests",
10        ":xsdc_attr_enumtype_tests",
11        ":xsdc_group_tests",
12        ":xsdc_nested_type_tests",
13        ":xsdc_predefined_types_tests",
14        ":xsdc_purchase_simple_tests",
15        ":xsdc_reference_tests",
16        ":xsdc_simple_complex_content_tests",
17        ":xsdc_simple_type_tests",
18    ],
19    test_options: {
20        unit_test: true,
21    },
22    static_libs: [
23        "junit",
24        "xsdc",
25        "stub-annotations",
26        "kxml2-2.3.0",
27    ],
28    java_resource_dirs: ["resources"],
29    test_suites: ["general-tests"],
30}
31
32cc_test_host {
33    name: "xsdc-cpp-tests",
34    srcs: [
35        "simple_type.cpp",
36        "tests.cpp",
37        "main.cpp",
38    ],
39    test_options: {
40        unit_test: true,
41    },
42    generated_sources: [
43        "xsdc_attr_group_simple_tests",
44        "xsdc_attr_enumtype_tests",
45        "xsdc_group_tests",
46        "xsdc_nested_type_tests",
47        "xsdc_predefined_types_tests",
48        "xsdc_purchase_simple_tests",
49        "xsdc_reference_tests",
50        "xsdc_simple_complex_content_tests",
51        "xsdc_simple_type_tests",
52    ],
53    generated_headers: [
54        "xsdc_attr_group_simple_tests",
55        "xsdc_attr_enumtype_tests",
56        "xsdc_group_tests",
57        "xsdc_nested_type_tests",
58        "xsdc_predefined_types_tests",
59        "xsdc_purchase_simple_tests",
60        "xsdc_reference_tests",
61        "xsdc_simple_complex_content_tests",
62        "xsdc_simple_type_tests",
63    ],
64    header_libs: ["libxsdc-utils"],
65    shared_libs: [
66        "libbase",
67        "libxml2",
68    ],
69    data: ["resources/*.xml"],
70    test_suites: ["general-tests"],
71}
72
73// These tests verify that enums-only and parser-only
74// modules can be combined later.
75cc_test_host {
76    name: "xsdc-cpp-tests-split",
77    srcs: [
78        "simple_type.cpp",
79        "main.cpp",
80    ],
81    test_options: {
82        unit_test: true,
83    },
84    generated_sources: [
85        "xsdc_simple_type_tests_enums",
86        "xsdc_simple_type_tests_parser",
87    ],
88    generated_headers: [
89        "xsdc_simple_type_tests_enums",
90        "xsdc_simple_type_tests_parser",
91    ],
92    header_libs: ["libxsdc-utils"],
93    shared_libs: [
94        "libbase",
95        "libxml2",
96    ],
97    data: ["resources/*.xml"],
98    test_suites: ["general-tests"],
99}
100
101// These tests verify that enums-only module can be used on
102// its own and it does not depend on libxml2.
103cc_test_host {
104    name: "xsdc-cpp-tests-enums",
105    srcs: [
106        "simple_type_enumsonly.cpp",
107        "main.cpp",
108    ],
109    test_options: {
110        unit_test: true,
111    },
112    generated_sources: [
113        "xsdc_simple_type_tests_enums",
114    ],
115    generated_headers: [
116        "xsdc_simple_type_tests_enums",
117    ],
118    header_libs: ["libxsdc-utils"],
119    shared_libs: [
120        "libbase",
121    ],
122    data: ["resources/*.xml"],
123    test_suites: ["general-tests"],
124}
125