google / jni-bind

JNI Bind is a set of advanced syntactic sugar for writing efficient correct JNI Code in C++17 (and up).
Apache License 2.0
245 stars 29 forks source link

Split apart array tests and give them some more consistent organisation. #218

Closed copybara-service[bot] closed 10 months ago

copybara-service[bot] commented 10 months ago

Split apart array tests and give them some more consistent organisation.

Array tests have been broken into: array_test.cc: Static definition tests. local_array_test.cc: Exercises LocalArray directly. local_array_test.cc: Exercises iterators, rank 1+. local_array_method_test.cc: Use of rank 1 LocalArrays in functions. local_array_method_multidimensional_test.cc: Use of rank 2+ LocalArrays in functions. local_array_field_test.cc: Use of rank 1 LocalArrays in fields. local_array_field_multidimensional_test.cc: (TODO) Use of rank 2+ LocalArrays in fields. local_string_test.cc: String related array tests (rank 1+).

Method tests have been split into 3 sections, "as return" for return focused tests, "as param" for param focused tests, and "complex" where they are used for both.

Also, Tests have had some renaming to understand their use more simply (where possible).

JNI signatures are now used, but instead of [[, the rank is written (as [ is forbidden in test name).

e.g. method signature Return{LocalArray<int, 2>}, Params{Array{}} becomes, "F_2I"