Notes
This function is in beta test. Please help improve it in the issues
here.
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
Running main() from gtest_main.cc Note: Google Test filter = Player.HumanSelectSquare [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from Player [ RUN ] Player.HumanSelectSquare Enter a position:/out/build/compile/gtest/test_player.cpp:66: Failure Expected: square.isEmpty() Which is: false To be equal to: true Enter a position:A1 is not empty. Enter a position:/out/build/compile/gtest/test_player.cpp:66: Failure Expected: square.isEmpty() Which is: false To be equal to: true Enter a position:A1 is not empty. Enter a position:A2 is not empty. Enter a position:/out/build/compile/gtest/test_player.cpp:66: Failure Expected: square.isEmpty() Which is: false To be equal to: true Enter a position:A1 is not empty. Enter a position:A2 is not empty. Enter a position:A3 is not empty. Enter a position:/out/build/compile/gtest/test_player.cpp:66: Failure Expected: square.isEmpty() Which is: false To be equa
JOJ Answer
Running main() from gtest_main.cc Note: Google Test filter = Player.HumanSelectSquare [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from Player [ RUN ] Player.HumanSelectSquare Enter a position:Enter a position:A1 is not empty. Enter a position:Enter a position:A1 is not empty. Enter a position:A2 is not empty. Enter a position:Enter a position:A1 is not empty. Enter a position:A2 is not empty. Enter a position:A3 is not empty. Enter a position:Enter a position:A1 is not empty. Enter a position:A2 is not empty. Enter a position:A3 is not empty. Enter a position:A4 is not empty. Enter a position:Enter a position:A1 is not empty. Enter a position:A2 is not empty. Enter a position:A3 is not empty. Enter a position:A4 is not empty. Enter a position:B1 is not empty. Enter a position:Enter a position:A1 is not empty. Enter a position:A2 is not empty. Enter a position:A3 is not empty. Enter a position:A4 is not empty. Enter a position:B1 is not em