summaryrefslogtreecommitdiff
path: root/tools/docs/crypto/crypto_docs.py
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2017-04-25 16:23:44 +0100
committerTobias Thierer <tobiast@google.com>2017-04-26 12:12:40 +0100
commita7794447c5d76087a7984757e5200a3e8f695efe (patch)
treeb624a5577409746a77544e7feab06cce46f8889c /tools/docs/crypto/crypto_docs.py
parent5b8e053c8d0b8c4ecc24af65b43e9c1a0ea170d8 (diff)
Add test coverage for PrintStream autoflushing behavior.
The new tests check that after print/write-ing to a PrintStream, the underlying OutputStream gets flush()ed if and only if autoFlush is set to true, and that at least one of those flush() calls happens after the last byte was written. As documented, PrintStream.checkError() flushes regardless of the autoFlush configuration. During testing, it appeared that PrintStream.print()/println()/write() calls result in exactly n + 1 invocations of flush(), where n is the number of \n characters written. This seems a little generous, but is within spec and matches RI behavior. The test was written to spec and doesn't assert the particular number of calls to flush(). Test: make cts && cts-tradefed run cts -m CtsLibcoreTestCases -t \ org.apache.harmony.tests.java.io.PrintStreamTest Change-Id: I4eeed19630a0a50af5a6dbc94d1e9fe6e11d0f31
Diffstat (limited to 'tools/docs/crypto/crypto_docs.py')
0 files changed, 0 insertions, 0 deletions