Question: FIX CODE TO PASS TESTS: . / test Running main ( ) from / root / googletest _ project / _ deps / googletest -
FIX CODE TO PASS TESTS:
test
Running main from rootgoogletestprojectdepsgoogletestsrcgoogletestsrcgtestmain.cc
Running tests from test suite.
Global test environment setup
tests from A
RUN AEncryptSimpleLowercase
OK AEncryptSimpleLowercase ms
RUN AEncryptSimpleUppercase
OK AEncryptSimpleUppercase ms
RUN AEncryptSpace
OK AEncryptSpace ms
RUN AEncryptYieldingSpace
teststestacpp:: Failure
Expected equality of these values:
encrypta
Which is: zxA
Which is: x
FAILED AEncryptYieldingSpace ms
RUN AEncryptLargeLeftShift
teststestacpp:: Failure
Expected equality of these values:
encryptc
Which is: Qx
s
Which is: sx
FAILED AEncryptLargeLeftShift ms
RUN AEncryptLargeRightShift
teststestacpp:: Failure
Expected equality of these values:
encryptc
Which is: ux
n
Which is: nxE
FAILED AEncryptLargeRightShift ms
RUN ADecryptSimple
OK ADecryptSimple ms
RUN ADecryptSpace
teststestacpp:: Failure
Expected equality of these values:
decrypt
Which is: zxA
a
Which is: ax
FAILED ADecryptSpace ms
RUN ADecryptYieldingSpace
teststestacpp:: Failure
Expected equality of these values:
decryptz
Which is: ax
Which is: x
FAILED ADecryptYieldingSpace ms
RUN ADecryptLargeLeftShift
teststestacpp:: Failure
Expected equality of these values:
decrypts
Which is: kxB
c
Which is: cx
FAILED ADecryptLargeLeftShift ms
RUN ADecryptLargeRightShift
teststestacpp:: Failure
Expected equality of these values:
decryptn
Which is: xC
c
Which is: cx
FAILED ADecryptLargeRightShift ms
tests from A ms total
Global test environment teardown
tests from test suite ran. ms total
PASSED tests.
FAILED tests, listed below:
FAILED AEncryptYieldingSpace
FAILED AEncryptLargeLeftShift
FAILED AEncryptLargeRightShift
FAILED ADecryptSpace
FAILED ADecryptYieldingSpace
FAILED ADecryptLargeLeftShift
FAILED ADecryptLargeRightShift
FAILED TESTS
make: makefile:: test Error
ENCRYPT.CPP:
#include
#include
#include
#include "encrypt.h
Function to shift characters
char shiftcharchar c int shift
if c a && c z
return staticcastac a shift ;
else if c
return ;
return c;
Encrypt single char
char encryptchar c int shift
return shiftcharc shift;
Decrypt single char
char decryptchar c int shift
return shiftcharcshift;
void processchar mode, int shift, char dir
int effectiveshift dir lshift : shift;
std::string phrase;
std::cout "Enter the phrase to mode e "encrypt: : "decryp
t: ;
std::getlinestd::cin, phrase;
std::cout "Result: ;
for char c : phrase
if mode e
std::cout encryptc effectiveshift;
else
std::cout decryptc effectiveshift;
std::cout std::endl;
Define and use at least one useful private function
Public functions
Define and implement the functions declared in encrypt.h here.
MAIN.CPP:
#include
#include "encrypt.h
#include
using namespace std;
Function declarations
char mainmenu;
void getoptsint &shift, char &dir;
Display the main menu and return the selected option
char mainmenu
char choice;
do
std::cou
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
