-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProject1YourTests.cpp
More file actions
38 lines (31 loc) · 1.27 KB
/
Project1YourTests.cpp
File metadata and controls
38 lines (31 loc) · 1.27 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
#include <cassert>
#include "Project1.h"
using namespace std;
void yourTests()
{
string output;
int uniqueWord;
//you must write 4 additional tests cases
//and document specifically what you are testing in each test
//you must add test cases, which were not coverred in the 10 test cases
//included in the project
//cases
//word separator with a underscore
assert( funWithCallLetter( "alphaBravoCharlie_DeltaEchoFoxtrox", output, uniqueWord ) == 2);
assert( output.compare("abc_def") == 0 );
cout << "additional test #1 completed" << endl;
//word separator with numbers
assert( funWithCallLetter( "alphaBravoCharlie 123 DeltaEchoFoxtrox", output, uniqueWord ) == 2);
assert( output.compare("abc 123 def") == 0 );
cout << "additional test #2 completed" << endl;
//double underscore between words counts as one word
assert( funWithCallLetter( "alphaBravoCharlie__DeltaEchoFoxtrox", output, uniqueWord ) == 1);
assert( output.compare("abc__def") == 0 );
assert( uniqueWord == 1 );
cout << "additional test #3 completed" << endl;
//plus symbol as one word
assert( funWithCallLetter( "alphaBravoCharlie+DeltaEchoFoxtrox", output, uniqueWord ) == 1);
assert( output.compare("abc+def") == 0 );
assert( uniqueWord == 1 );
cout << "additional test #4 completed" << endl;
}