Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr


        

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 = Board.Place
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Board
[ RUN      ] Board.Place
/out/build/compile/gtest/test_board.cpp:67: Failure
      Expected: &square.getPiece()
      Which is: 0x55f64d83cdb0
To be equal to: &pieces[i * N + j]
      Which is: 0x55f64d83cc60
/out/build/compile/gtest/test_board.cpp:67: Failure
      Expected: &square.getPiece()
      Which is: 0x55f64d83dd90
To be equal to: &pieces[i * N + j]
      Which is: 0x55f64d83ccb0
/out/build/compile/gtest/test_board.cpp:67: Failure
      Expected: &square.getPiece()
      Which is: 0x55f64d83dff0
To be equal to: &pieces[i * N + j]
      Which is: 0x55f64d83cd00
/out/build/compile/gtest/test_board.cpp:67: Failure
      Expected: &square.getPiece()
      Which is: 0x55f64d83e330
To be equal to: &pieces[i * N + j]
      Which is: 0x55f64d83cd50
[  FAILED  ] Board.Place
[----------] Global test environment tear-d

JOJ Answer

Running main() from gtest_main.cc
Note: Google Test filter = Board.Place
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Board
[ RUN      ] Board.Place
[       OK ] Board.Place
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran.
[  PASSED  ] 1 test.