-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUndoRedeStringClassTest.cpp
More file actions
61 lines (36 loc) · 1.08 KB
/
Copy pathUndoRedeStringClassTest.cpp
File metadata and controls
61 lines (36 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include "clsMyString.h"
#include <iostream>
using namespace std;
int main()
{
cout << "\n\n\t\t\t\t\t\t Undo/Redo Project\n\n";
clsMyString S1;
cout << "\nS1 = " << S1.Value << "\n";
S1.Value = "Mohammed";
cout << "S1 = " << S1.Value << "\n";
S1.Value = "Mohammed2";
cout << "S1 = " << S1.Value << "\n";
S1.Value = "Mohammed3";
cout << "S1 = " << S1.Value << "\n";
cout << "\n\nUndo: ";
cout << "\n__________\n";
S1.Undo();
cout << "\nS1 after undo = " << S1.Value << "\n";
S1.Undo();
cout << "S1 after undo = " << S1.Value << "\n";
S1.Undo();
cout << "S1 after undo = " << S1.Value << "\n";
cout << "\n\nRedo: ";
cout << "\n__________\n";
S1.Redo();
cout << "\nS1 after Redo = " << S1.Value << "\n";
S1.Redo();
cout << "S1 after Redo = " << S1.Value << "\n";
S1.Redo();
cout << "S1 after Redo = " << S1.Value << "\n";
cout << "\n==================================================\n";
cout << " ALL TESTS COMPLETED SUCCESSFULLY \n";
cout << "==================================================\n";
system("pause>0");
return 0;
}