File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ namespace xcpp
4040 template <class T >
4141 nl::json mime_bundle_repr (const T& value)
4242 {
43- return detail::mime_bundle_repr_via_sstream (& value);
43+ return detail::mime_bundle_repr_via_sstream (value);
4444 }
4545}
4646
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ if(EMSCRIPTEN)
7070 PUBLIC "SHELL: -fexceptions"
7171 PUBLIC "SHELL: -s MAIN_MODULE=1"
7272 PUBLIC "SHELL: -s WASM_BIGINT"
73- PUBLIC "SHELL: -s ASSERTIONS=0 "
73+ PUBLIC "SHELL: -s ASSERTIONS=1 "
7474 PUBLIC "SHELL: -s ALLOW_MEMORY_GROWTH=1"
7575 PUBLIC "SHELL: -s STACK_SIZE=32mb"
7676 PUBLIC "SHELL: -s INITIAL_MEMORY=128mb"
Original file line number Diff line number Diff line change 1515#include " xeus-cpp/xutils.hpp"
1616#include " xeus-cpp/xoptions.hpp"
1717#include " xeus-cpp/xeus_cpp_config.hpp"
18+ #include " xcpp/xmime.hpp"
1819
1920#include " ../src/xparser.hpp"
2021#include " ../src/xsystem.hpp"
@@ -1079,3 +1080,17 @@ TEST_SUITE("file") {
10791080 infile.close ();
10801081 }
10811082}
1083+
1084+ TEST_SUITE (" mime_bundle_repr" )
1085+ {
1086+ TEST_CASE (" int" )
1087+ {
1088+ int value = 42 ;
1089+ nl::json res = xcpp::mime_bundle_repr (value);
1090+ nl::json expected = {
1091+ {" text/plain" , " 42" }
1092+ };
1093+
1094+ REQUIRE (res == expected);
1095+ }
1096+ }
You can’t perform that action at this time.
0 commit comments