unittest/sudokucelltest.cpp
// Confirms that constants for testing are correct
Confirms that constants for testing are correct
Confirms that constants for testing are correct
void SudokuCellTest::verifyTestVector(void) {
    assert(isUniqueCandidates(SudokuTestCandidates::Empty) == false);
    assert(hasMultipleCandidates(SudokuTestCandidates::Empty) == false);
    assert(isUniqueCandidates(SudokuTestCandidates::OneOnly) == true);
    assert(isUniqueCandidates(SudokuTestCandidates::TwoOnly) == true);
    assert(isUniqueCandidates(SudokuTestCandidates::CenterOnly) == true);
    assert(isUniqueCandidates(SudokuTestCandidates::NineOnly) == true);
    assert(hasMultipleCandidates(SudokuTestCandidates::CenterLine) == true);
    assert(hasMultipleCandidates(SudokuTestCandidates::FourAndSix) == true);
    assert(hasMultipleCandidates(SudokuTestCandidates::DoubleLine) == true);
    assert(hasMultipleCandidates(SudokuTestCandidates::TwoToNine) == true);
    assert(hasMultipleCandidates(SudokuTestCandidates::ExceptTwo) == true);
    assert(hasMultipleCandidates(SudokuTestCandidates::ExceptCenter) == true);
    assert(hasMultipleCandidates(SudokuTestCandidates::Odds) == true);
    assert(hasMultipleCandidates(SudokuTestCandidates::Evens) == true);
    assert(hasMultipleCandidates(SudokuTestCandidates::All) == true);
    assert((SudokuTestCandidates::OneOnly + SudokuTestCandidates::TwoToNine)
           == SudokuTestCandidates::All);
    assert((SudokuTestCandidates::TwoOnly + SudokuTestCandidates::ExceptTwo)
           == SudokuTestCandidates::All);
    assert((SudokuTestCandidates::CenterOnly + SudokuTestCandidates::ExceptCenter)
           == SudokuTestCandidates::All);
    assert((SudokuTestCandidates::CenterOnly + SudokuTestCandidates::FourAndSix)
           == SudokuTestCandidates::CenterLine);
    assert((SudokuTestCandidates::CenterLine + SudokuTestCandidates::DoubleLine)
           == SudokuTestCandidates::All);
    assert((SudokuTestCandidates::Odds + SudokuTestCandidates::Evens)
           == SudokuTestCandidates::All);
    assert(arraySizeof(SudokuTestCandidates::CandidateSetOne)
           == arraySizeof(SudokuTestCandidates::CandidateSetTwo));
    assert(arraySizeof(SudokuTestCandidates::CandidateSetOne)
           == arraySizeof(SudokuTestCandidates::CandidateSetCenter));
    return;
}
void SudokuCellTest :: verifyTestVector ( void ) { assert ( isUniqueCandidates ( SudokuTestCandidates :: Empty ) == false ) ; assert ( hasMultipleCandidates ( SudokuTestCandidates :: Empty ) == false ) ; assert ( isUniqueCandidates ( SudokuTestCandidates :: OneOnly ) == true ) ; assert ( isUniqueCandidates ( SudokuTestCandidates :: TwoOnly ) == true ) ; assert ( isUniqueCandidates ( SudokuTestCandidates :: CenterOnly ) == true ) ; assert ( isUniqueCandidates ( SudokuTestCandidates :: NineOnly ) == true ) ; assert ( hasMultipleCandidates ( SudokuTestCandidates :: CenterLine ) == true ) ; assert ( hasMultipleCandidates ( SudokuTestCandidates :: FourAndSix ) == true ) ; assert ( hasMultipleCandidates ( SudokuTestCandidates :: DoubleLine ) == true ) ; assert ( hasMultipleCandidates ( SudokuTestCandidates :: TwoToNine ) == true ) ; assert ( hasMultipleCandidates ( SudokuTestCandidates :: ExceptTwo ) == true ) ; assert ( hasMultipleCandidates ( SudokuTestCandidates :: ExceptCenter ) == true ) ; assert ( hasMultipleCandidates ( SudokuTestCandidates :: Odds ) == true ) ; assert ( hasMultipleCandidates ( SudokuTestCandidates :: Evens ) == true ) ; assert ( hasMultipleCandidates ( SudokuTestCandidates :: All ) == true ) ; assert ( ( SudokuTestCandidates :: OneOnly + SudokuTestCandidates :: TwoToNine ) == SudokuTestCandidates :: All ) ; assert ( ( SudokuTestCandidates :: TwoOnly + SudokuTestCandidates :: ExceptTwo ) == SudokuTestCandidates :: All ) ; assert ( ( SudokuTestCandidates :: CenterOnly + SudokuTestCandidates :: ExceptCenter ) == SudokuTestCandidates :: All ) ; assert ( ( SudokuTestCandidates :: CenterOnly + SudokuTestCandidates :: FourAndSix ) == SudokuTestCandidates :: CenterLine ) ; assert ( ( SudokuTestCandidates :: CenterLine + SudokuTestCandidates :: DoubleLine ) == SudokuTestCandidates :: All ) ; assert ( ( SudokuTestCandidates :: Odds + SudokuTestCandidates :: Evens ) == SudokuTestCandidates :: All ) ; assert ( arraySizeof ( SudokuTestCandidates :: CandidateSetOne ) == arraySizeof ( SudokuTestCandidates :: CandidateSetTwo ) ) ; assert ( arraySizeof ( SudokuTestCandidates :: CandidateSetOne ) == arraySizeof ( SudokuTestCandidates :: CandidateSetCenter ) ) ; return ; }
Confirms that constants for testing are correct
Confirms that constants for testing are correct