TEST(Question_2_7, NoPalindromeOddElements) { LinkedList<char> linkedList; linkedList.AddNodeAtEnd('a'); linkedList.AddNodeAtEnd('b'); linkedList.AddNodeAtEnd('c'); ASSERT_FALSE(linkedList.IsPalindrome()); }
TEST(Question_2_7, PalindromeEvenElements) { LinkedList<char> linkedList; linkedList.AddNodeAtEnd('a'); linkedList.AddNodeAtEnd('b'); linkedList.AddNodeAtEnd('b'); linkedList.AddNodeAtEnd('a'); ASSERT_TRUE(linkedList.IsPalindrome()); }