Skip to content
Snippets Groups Projects
Commit 86c38f21 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Test ExportToPythonAndBack: don't duplicate code output

parent 9ecf36af
No related branches found
No related tags found
1 merge request!524improve export-to-Python tests
...@@ -375,7 +375,10 @@ TEST_F(PyEmbedded, ExportToPythonAndBack) ...@@ -375,7 +375,10 @@ TEST_F(PyEmbedded, ExportToPythonAndBack)
std::unique_ptr<MultiLayer> sample2(sample1->clone()); std::unique_ptr<MultiLayer> sample2(sample1->clone());
const std::string code2 = Py::Export::sampleCode(*sample2); const std::string code2 = Py::Export::sampleCode(*sample2);
std::cout << "Test ExportToPythonAndBack: code2:\n" << code2 << std::endl; if (code2 != code1)
std::cout << "Test ExportToPythonAndBack: code2:\n" << code2 << std::endl;
else
std::cout << "Test ExportToPythonAndBack: code2 = code1" << std::endl;
EXPECT_TRUE(code2 == code1); EXPECT_TRUE(code2 == code1);
const std::string snippet = const std::string snippet =
...@@ -383,8 +386,10 @@ TEST_F(PyEmbedded, ExportToPythonAndBack) ...@@ -383,8 +386,10 @@ TEST_F(PyEmbedded, ExportToPythonAndBack)
const auto sample3 = const auto sample3 =
Py::Import::createFromPython(snippet, "get_sample", BABuild::buildLibDir()); Py::Import::createFromPython(snippet, "get_sample", BABuild::buildLibDir());
const std::string code3 = Py::Export::sampleCode(*sample3); const std::string code3 = Py::Export::sampleCode(*sample3);
std::cout << "Test ExportToPythonAndBack: code3:\n" << code3 << std::endl; if (code3 != code1)
std::cout << "Test ExportToPythonAndBack: code3:\n" << code3 << std::endl;
else
std::cout << "Test ExportToPythonAndBack: code3 = code1" << std::endl;
EXPECT_TRUE(code3 == code1); EXPECT_TRUE(code3 == code1);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment