Skip to content
Snippets Groups Projects
Commit a7e545ce authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Fixed test on Windows

parent d17dbfb3
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,11 @@ std::pair<Aidge::NodePtr, std::set<Aidge::NodePtr>> Aidge::RandomGraph::gen(std:
for (size_t i = 0; i < nbNodes; ++i) {
for (size_t j = (acyclic) ? i + 1 : 0; j < nbNodes; ++j) {
if (i == j) {
// Do not connected node to itself in case of cyclic graph!
continue;
}
for (size_t outId = 0; outId < nodes[i]->nbOutputs(); ++outId) {
for (size_t inId = 0; inId < nodes[j]->nbInputs(); ++inId) {
if (dLink(gen)) {
......
......@@ -123,7 +123,10 @@ TEST_CASE("clone_with_delete") {
// graphs keep the same inputs/outputs despites the deleted nodes
// (meaning the deleted nodes are not input/output of the graph).
// Otherwise, the last two REQUIRE are not garanteed to be true!
std::mt19937::result_type seed(42);
// Warning: distributions are not required to behave the same way by the standard,
// therefore the seed has to work for both GCC and MSVC...
// See https://stackoverflow.com/questions/38532927/why-gcc-and-msvc-stdnormal-distribution-are-different
std::mt19937::result_type seed(243);
for (int test = 0; test < nbTests; ++test) {
RandomGraph randGraph;
......
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