| 1635 | } |
| 1636 | |
| 1637 | static void callWithMemoryView(val v) { |
| 1638 | // static so the JS test can read the memory after callTakeMemoryView runs |
| 1639 | static unsigned char data[] = {0, 1, 2, 3, 4, 5, 6, 7}; |
| 1640 | v(typed_memory_view(getElementCount(data), data)); |
| 1641 | static float f[] = {1.5f, 2.5f, 3.5f, 4.5f}; |
| 1642 | v(typed_memory_view(getElementCount(f), f)); |
| 1643 | static short s[] = {1000, 100, 10, 1}; |
| 1644 | v(typed_memory_view(getElementCount(s), s)); |
| 1645 | } |
| 1646 | |
| 1647 | EMSCRIPTEN_BINDINGS(memory_view_tests) { |
| 1648 | function("callWithMemoryView", &callWithMemoryView); |
nothing calls this directly
no test coverage detected