(out, js_map, utf8, note)
| 121 | |
| 122 | |
| 123 | def generate_cc_source(out, js_map, utf8, note): |
| 124 | out.write( |
| 125 | f"""{_copyright} |
| 126 | |
| 127 | {note} |
| 128 | |
| 129 | #include <stddef.h> // For NULL. |
| 130 | #include "atoms.h" |
| 131 | |
| 132 | namespace webdriver {{ |
| 133 | namespace atoms {{ |
| 134 | |
| 135 | """ |
| 136 | ) |
| 137 | |
| 138 | for name, file in js_map.items(): |
| 139 | contents = open(file).read() |
| 140 | write_atom_literal(out, name, contents, "cc", utf8) |
| 141 | |
| 142 | out.write(""" |
| 143 | } // namespace atoms |
| 144 | } // namespace webdriver |
| 145 | |
| 146 | """) |
| 147 | |
| 148 | |
| 149 | def generate_java_source(file_name, out, preamble, js_map, note): |
no test coverage detected