소스 검색

Fixed readStringTo() to be consistent with eoln().

readStringTo() stop reading when it reaches CR, LF, or the end of the file.
eoln() reads the patterns CRLF or LF.  This means that it's possible to call
readStringTo() on the string "\r" and not advance the stream pointer at all
without trigger eof.

This means checkers like fcmp/lcmp can loop infinitely if given malformed
expected outputs.  As a simpler example, the below code will loop forever on
the file "\r".

while (!ans.eof())
  string s = ans.readString();
msg555 9 년 전
부모
커밋
938b2a53fd
1개의 변경된 파일0개의 추가작업 그리고 0개의 파일을 삭제
  1. BIN
      testlib.h

BIN
testlib.h