-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.cpp
More file actions
36 lines (30 loc) · 989 Bytes
/
Copy pathTest.cpp
File metadata and controls
36 lines (30 loc) · 989 Bytes
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
/**
* An example of how to write unit tests.
* Use this as a basis to build a more complete Test.cpp file.
*
* IMPORTANT: Please write more tests - the tests here are only for example and are not complete.
*
* Date: 2020-02
*/
#include "doctest.h"
#include "PhoneticFinder.hpp"
using namespace phonetic;
#include <string>
#include <iostream>
using namespace std;
TEST_CASE("Test replacement of p and b") {
string text = "xxx happy yyy";
CHECK(find(text, "happy") == string("happy"));
CHECK(find(text, "habby") == string("happy"));
CHECK(find(text, "hapby") == string("happy"));
CHECK(find(text, "habpy") == string("happy"));
/* Add more checks here */
}
TEST_CASE("Grade: 99") {
string text = "Happi xxx yyy";
CHECK(find(text, "happi") == string("Happi"));
CHECK(find(text, "Happi") == string("Happi"));
CHECK(find(text, "HAPPI") == string("Happi"));
CHECK(find(text, "HaPpI") == string("Happi"));
/* Add more checks here */
}