ASSERT(pResult != NULL);\r
ASSERT(_tcsncmp(pResult, TEXT("--a---"), nLen) == 0);\r
ASSERT(nLen == 6);\r
+\r
+ // Undo\r
+ ASSERT(pDoc->Undo());\r
+ pResult = pDoc->GetDocumentData(&nLen);\r
+ ASSERT(pResult != NULL);\r
+ ASSERT(_tcsncmp(pResult, TEXT("-----"), nLen) == 0);\r
+ ASSERT(nLen == 5);\r
+\r
+ // Undo(exactly say, this is Redo)\r
+ ASSERT(pDoc->Undo());\r
+\r
+ // expect is --a---\r
+ pResult = pDoc->GetDocumentData(&nLen);\r
+ ASSERT(pResult != NULL);\r
+ ASSERT(_tcsncmp(pResult, TEXT("--a---"), nLen) == 0);\r
+ ASSERT(nLen == 6);\r
}
\ No newline at end of file