@no_wasm_backend('long doubles are f128s in wasm backend')
def test_embind_4(self):
    self.emcc_args += ['--bind', '--post-js', 'post.js']
    create_test_file('post.js', '\n      function printFirstElement() {\n        out(Module.getBufferView()[0]);\n      }\n    ')
    src = '\n      #include <emscripten.h>\n      #include <emscripten/bind.h>\n      #include <emscripten/val.h>\n      #include <stdio.h>\n      using namespace emscripten;\n\n      const size_t kBufferSize = 1024;\n      long double buffer[kBufferSize];\n      val getBufferView(void) {\n          val v = val(typed_memory_view(kBufferSize, buffer));\n          return v;\n      }\n      EMSCRIPTEN_BINDINGS(my_module) {\n          function("getBufferView", &getBufferView);\n      }\n\n      int main(int argc, char **argv) {\n        buffer[0] = 107;\n        EM_ASM(printFirstElement());\n        return 0;\n      }\n    '
    self.do_run(src, '107')
@no_wasm_backend('long doubles are f128s in wasm backend')
def test_embind_4(self):
    self.emcc_args += ['--bind', '--post-js', 'post.js']
    create_test_file('post.js', '\n      function printFirstElement() {\n        out(Module.getBufferView()[0]);\n      }\n    ')
    src = '\n      #include <emscripten.h>\n      #include <emscripten/bind.h>\n      #include <emscripten/val.h>\n      #include <stdio.h>\n      using namespace emscripten;\n\n      const size_t kBufferSize = 1024;\n      long double buffer[kBufferSize];\n      val getBufferView(void) {\n          val v = val(typed_memory_view(kBufferSize, buffer));\n          return v;\n      }\n      EMSCRIPTEN_BINDINGS(my_module) {\n          function("getBufferView", &getBufferView);\n      }\n\n      int main(int argc, char **argv) {\n        buffer[0] = 107;\n        EM_ASM(printFirstElement());\n        return 0;\n      }\n    '
    self.do_run(src, '107')