Skip to content

Commit 35ff72f

Browse files
JohanMabilleanutosh491
authored andcommitted
Added mime_bundle_repr test
1 parent bbf796c commit 35ff72f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/test_interpreter.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
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+
}

0 commit comments

Comments
 (0)