| 8 | |
| 9 | namespace { |
| 10 | EM_JS(void, djinni_init_testsuite_color_consts, (), { |
| 11 | Module.testsuite_Color = { |
| 12 | RED : 0, |
| 13 | ORANGE : 1, |
| 14 | YELLOW : 2, |
| 15 | GREEN : 3, |
| 16 | BLUE : 4, |
| 17 | /** |
| 18 | * "It is customary to list indigo as a color lying between blue and violet, but it has |
| 19 | * never seemed to me that indigo is worth the dignity of being considered a separate |
| 20 | * color. To my eyes it seems merely deep blue." --Isaac Asimov |
| 21 | */ |
| 22 | INDIGO : 5, |
| 23 | VIOLET : 6, |
| 24 | } |
| 25 | }) |
| 26 | } |
| 27 | |
| 28 | void NativeColor::staticInitializeConstants() { |
| 29 | static std::once_flag initOnce; |
| 30 | std::call_once(initOnce, [] { |
| 31 | djinni_init_testsuite_color_consts(); |
| 32 | ::djinni::djinni_register_name_in_ns("testsuite_Color", "testsuite.Color"); |
| 33 | }); |
| 34 | } |
| 35 | |
| 36 | EMSCRIPTEN_BINDINGS(testsuite_color) { |
| 37 | NativeColor::staticInitializeConstants(); |
nothing calls this directly
no outgoing calls
no test coverage detected