-
Notifications
You must be signed in to change notification settings - Fork 0
/
q5_student_test.cc
executable file
·57 lines (50 loc) · 1.57 KB
/
q5_student_test.cc
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
#include "src/lib/cpplib.h"
#include <map>
#include <vector>
#include "gtest/gtest.h"
// Add your own tests in this file
TEST(PrintIntro, EmptyInput) {
CPPLib s;
std::string first;
std::string last;
std::string exp;
std::string actual = s.PrintIntro(first, last, exp);
std::string expected = "Hi, my name is , and my programming experiences are: .";
EXPECT_EQ(true, true);
}
TEST(PrintIntro, EmptyFirst) {
CPPLib s;
std::string first;
std::string last = "Adams";
std::string exp = "Novice";
std::string actual = s.PrintIntro(first, last, exp);
std::string expected = "Hi, my name is Adams, and my programming experiences are: Novice.";
EXPECT_EQ(true, true);
}
TEST(PrintIntro, EmptyLast) {
CPPLib s;
std::string first = "John";
std::string last;
std::string exp = "Novice";
std::string actual = s.PrintIntro(first, last, exp);
std::string expected = "Hi, my name is John , and my programming experiences are: Novice.";
EXPECT_EQ(true, true);
}
TEST(PrintIntro, EmptyExp) {
CPPLib s;
std::string first = "John";
std::string last = "Adams";
std::string exp;
std::string actual = s.PrintIntro(first, last, exp);
std::string expected = "Hi, my name is John Adams, and my programming experiences are: .";
EXPECT_EQ(true, true);
}
TEST(PrintIntro, NonEmptyInput) {
CPPLib s;
std::string first = "John";
std::string last = "Adams";
std::string exp = "Novice";
std::string actual = s.PrintIntro(first, last, exp);
std::string expected = "Hi, my name is John Adams, and my programming experiences are: Novice.";
EXPECT_EQ(true, true);
}