Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tests/unit/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,17 @@ TEST_CASE( "setQuESTSeeds", TEST_CATEGORY ) {

SECTION( "number of seeds" ) {

unsigned seeds[] = { 0 };
int numSeeds = GENERATE( -1, 0 );

REQUIRE_THROWS_WITH( setQuESTSeeds(nullptr, numSeeds), ContainsSubstring("Invalid number of random seeds") );
REQUIRE_THROWS_WITH( setQuESTSeeds(seeds, numSeeds), ContainsSubstring("Invalid number of random seeds") );
}

SECTION( "invalid pointer" ) {

int numSeeds = GENERATE( 1, 2 );

REQUIRE_THROWS_WITH( setQuESTSeeds(nullptr, numSeeds), ContainsSubstring("The given seeds list pointer is NULL") );
}

// inconsistency between nodes is permitted
Expand Down
Loading