/// Tests the Show Functions /// @return True if all tests were executed, false if not bool KeySignatureTestSuite::TestCaseShow() { //------Last Checked------// // - Dec 11, 2004 KeySignature keySignature; keySignature.Show(); TEST(wxT("Show - true"), keySignature.IsShown()); keySignature.Hide(); TEST(wxT("Show - false"), !keySignature.IsShown()); 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); }