/// Tests the Cancellation Functions /// @return True if all tests were executed, false if not bool KeySignatureTestSuite::TestCaseCancellation() { //------Last Checked------// // - Dec 11, 2004 KeySignature keySignature; keySignature.SetCancellation(); TEST(wxT("SetCancellation - true"), keySignature.IsCancellation()); keySignature.SetCancellation(false); TEST(wxT("SetCancellation - false"), !keySignature.IsCancellation()); return (true); }
/// Tests the Constructors /// @return True if all tests were executed, false if not bool KeySignatureTestSuite::TestCaseConstructor() { //------Last Checked------// // - Dec 11, 2004 // TEST CASE: Default Constructor { KeySignature keySignature; TEST(wxT("Default Constructor"), (keySignature.IsMajorKey()) && (keySignature.IsMajorKey()) && (!keySignature.IsShown()) && (!keySignature.IsCancellation()) ); } // TEST CASE: Primary Constructor { KeySignature keySignature(KeySignature::minorKey, KeySignature::threeFlats); TEST(wxT("Primary Constructor"), (keySignature.IsMinorKey()) && (keySignature.HasThreeFlats()) && (!keySignature.IsShown()) && (!keySignature.IsCancellation()) ); } // TEST CASE: Copy Constructors { KeySignature keySignature(KeySignature::minorKey, KeySignature::threeFlats); KeySignature keySignature2(keySignature); TEST(wxT("Copy Constructor"), (keySignature2.IsMinorKey()) && (keySignature2.HasThreeFlats()) && (!keySignature.IsShown()) && (!keySignature.IsCancellation()) ); } return (true); }