From fba4a81bec818df9789fbc724122ec3ce0be236d Mon Sep 17 00:00:00 2001 From: Oliver Thomson Brown Date: Tue, 2 Jun 2026 11:52:24 +0100 Subject: [PATCH] tests/unit/debug.cpp: updated setQuESTSeeds validation tests to include new validation --- tests/unit/debug.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/unit/debug.cpp b/tests/unit/debug.cpp index 714cffe7b..421cf55ea 100644 --- a/tests/unit/debug.cpp +++ b/tests/unit/debug.cpp @@ -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