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 = Pool.GetUnusedPieceStr
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Pool
[ RUN      ] Pool.GetUnusedPieceStr
/out/build/compile/gtest/test_pool.cpp:56: Failure
      Expected: &piece
      Which is: 0x7ffed448eed0
To be equal to: &pool.pieces[i]
      Which is: 0x7ffed448ee80
unknown file: Failure
C++ exception with description "SECH is already used." thrown in the test body.
[  FAILED  ] Pool.GetUnusedPieceStr
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran.
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] Pool.GetUnusedPieceStr

 1 FAILED TEST

JOJ Answer

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