g to input the numbers I want instead. Like in main insetad of inputting the numbers myself, I wouldn't have to input the numbers after running the code because I would input them in the code before. Or is there a way I can create a test code to test certain dates first that are pre determined and I don't have to enter them? Here
can you help me please. this is my intital code but is there a way i can have set dates to be tested rather than me having to input the numbers I want instead. Like in main insetad of inputting the numbers myself, I wouldn't have to input the numbers after running the code because I would input them in the code before. Or is there a way I can create a test code to test certain dates first that are pre determined and I don't have to enter them? Here is my code below:

Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images

How do I set up my code to be tested if I am supposed to test it like this?
TEST(Date, 1) {
dateType date1(3, 15, 2008);
testing::internal::CaptureStdout();
// output date1.printDate();
std::string output = testing::internal::GetCapturedStdout();
ASSERT_TRUE(output == "3-15-2008");
ASSERT_TRUE(date1.isLeapYear()); }








