summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2019-04-01 19:18:01 +0100
committerTobias Thierer <tobiast@google.com>2019-04-02 14:23:07 +0100
commit62db047bc129fe96cca0f4a347e9b1fb30163acb (patch)
treeb5ec5d7b499056e96b688e73a7d39e136dd0c09d /annotations/generate_annotated_java_files.py
parente039e335b1b1f6f6bcee3d6632e84362bc34757a (diff)
Test android.system.Os instead of libcore.io.Libcore.os
libcore.libcore.io.OsTest was testing libcore.io.Libcore.os, which is the implementation of android.system.Os. This CL moves all applicable parts into libcore.android.system.OsTest and makes them test android.system.Os instead, since that is the public API. Notes: - android.system.OsTest still covers both versions of sendfile() (via enum SendFileImpl) like the old test did. In a future CL, we could optionally drop coverage for the libcore.io version since it's not part of any API surface. - libcore.io.Os has a method accept(FileDescriptor, SocketAddress) but android.system.Os has accept(FileDescriptor, InetSocketAddress). OsTest calls accept() both with InetSocketAddress and UnixSocketAddress compile-time types. This CL adds a @hide method android.system.Os.accept(FileDescriptor, SocketAddress) and delegates to it from the InetSocketAddress method; this way, the existing tests can be reused for android.system.Os. - Even though android/system/OsTest.java did not exist before this CL, I've kept the existing file header from the existing OsTest.java from which the contents of the file are derived. - One test is known to be failing; this CL updates the expectations file to the new name. Fixes: 129523169 Test: atest CtsLibcoreTestCases:libcore.android.system.OsTest Test: atest CtsLibcoreTestCases:libcore.libcore.io.OsTest Test: Used meld to compare libcore/io/OsTest.java from before this CL vs. android/system/OsTest.java after this CL to confirm that the only differences are (a) Libcore.{os,rawOs}. -> Os., (b) removal of the logic that remained in libcore/io/OsTest.java Change-Id: Ic6d7ef683a26ae8a7198a30638bfaa87012f3b11
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions