| 859 | } // namespace crown |
| 860 | |
| 861 | int main(int argc, char **argv) |
| 862 | { |
| 863 | using namespace crown; |
| 864 | |
| 865 | #if CROWN_BUILD_UNIT_TESTS |
| 866 | CommandLine cl(argc, (const char **)argv); |
| 867 | if (cl.has_option("run-unit-tests")) { |
| 868 | return main_unit_tests(); |
| 869 | } |
| 870 | #endif |
| 871 | |
| 872 | InitGlobals m; |
| 873 | CE_UNUSED(m); |
| 874 | |
| 875 | DeviceOptions opts(default_allocator(), argc, (const char **)argv); |
| 876 | bool quit = false; |
| 877 | int ec = opts.parse(&quit); |
| 878 | |
| 879 | if (quit) |
| 880 | return ec; |
| 881 | |
| 882 | if (ec == EXIT_SUCCESS) { |
| 883 | s_emscripten_device = CE_NEW(default_allocator(), EmscriptenDevice)(default_allocator()); |
| 884 | ec = s_emscripten_device->run(&opts); |
| 885 | CE_DELETE(default_allocator(), s_emscripten_device); |
| 886 | } |
| 887 | |
| 888 | return ec; |
| 889 | } |
| 890 | |
| 891 | #endif // if CROWN_PLATFORM_LINUX |
nothing calls this directly
no test coverage detected